Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

repeating date fields

Status
Not open for further replies.

free2day

IS-IT--Management
Jul 1, 2003
1
US
I am trying to have a repeating date field sort by newest date. HOW?
E
 
The sort function is poorly documented for FM. Too many assumptions are made, like you can figure this out on your own is one of them.

The SORT function by itself is fairly straight forward. Select SORT from the menu, select ascending or descending, and select the field or fields you wish to sort by, in this case your date field.

Try writing a script to do this is the harder, or should say easy part once you know how. A sort script does not allow you to make all of the selections as above. To write the script, select the sort function and close the script. Now manually do a sort exactly as you want the script to behave. The single or multiple fields to search, ascending or descending and perform the sort. Now open up your script and immediately close it. You will be prompted to keep or replace, keep or replace what I use to say. This replace is going to save the last find criteria to your script. Now you can write a script for ascending, another one for descending and so on.

A script can also be written to look at the current status of the sort, and automatically sort in the opposite direction. In other words, click one button to have the field sort ascending, then click the same button again and it knows to sort descending.

Let me know if this helps you.

Marty
 
After further review, I can see you are working with repeating date fields. The sort function is for sorting individual records, not a repeating field.

Marty
 
Hi, Free2Day. Don't you just love peple who give you this sort of advice? Just don't do it!!! DO NOT USE repeating fields. They are not suported well; they are a hangover from the old flat fle days; child files are almost always a simpler option.

Cheers,
Paul J.
 
Hurray!!! There is at least one other FileMaker person in this forum. I have spent the last hour typing in responses to correct very bad- okay flat stupid, wrong advise from a pair of guys that like to answer questions without knowing what in the world they are talking about. I'd mention names but I have no wish to argue.

The advise to steer away from repeating fields was good advise. I would like to add two little pieces of advise to go with that advise. One- you have write a script to automatically create the records he suggests, so getting rid of those repeating fileds can be quite easy. Two- when dispalying the new records- most likley through a portal you can define a sort order to the realtionship so these dates are always in order- whether the records are sorted or not.


Thanks,


Joe
 
I would like to ask advise on a different use of repeating fields. I'm writing a simple event reminder that is using a relationship between two FMP files. One file is the "event" database and the other is a job tracking db for a quickprint service bureau.

The idea is to allow the manager to create an event (single record) and then click a button to set the event to repeat once, weekly or monthly. The event dates would then be calculated for a year in advance.

I have an "event date" field with a max of 52 repeating values (in the case of an event that needs to repeat weekly). If the user clicks "once" then the script clears out all 52 slots and then inserts a single date. If the user clicks "monthly" it clears all the fields and then calculates 12 dates and inserts them into the first 12 fields. "Weekly" does the same but with 52 entries, one for each week.

The nice thing is that I can simply use a portal in the main job tracking db to display any event records in the reminder db that have a reminder date (in any of the repeating fields) that matches Status(CurrentDate).

The thing I don't like is the fact that there is no clever way I can find to display 52 repeating field values in the event db. I have to show all 52 repeating date fields in a layout that is 3-4 screens tall.

I've heard rumor that there is a way to parse repeating field values into a portal? This would allow the user to scroll through the list of event dates with a vertical scrollbar and would allow my event entry database to fit on one screen.

Thank you in advance for any assistance.
 
svkingpen
I applogise for using this post but I really have to due to your rahter offending post:
-----------
I have spent the last hour typing in responses to correct very bad- okay flat stupid, wrong advise from a pair of guys that like to answer questions without knowing what in the world they are talking about. I'd mention names but I have no wish to argue.
-----------
ooo common pleeeasee..."I'd mention names" ....how many names are on here....

Please Stop puting people down for trying to help and share their knowledge (no matter how little or wrong it is)....afterall, not all of us are "professional programmers" and are still trying to learn.
your advice came only....hm...what?.... 20 days after the original post and started of by saying how everybody else is an idiot! Get of your "professional programmer horse" and realise that some of us are still beginers!

if u have issues with MY posts please do point your comments to me!

besides, free2day never seem to be interested in following up on the post so why should anyone else offer more explanation :( then one line posts!?

again, I applogise for using this thread but I do understand that Socail Skils 101 is not a requirement for Programming Majors!
All the best!

> need more info?
:: don't click HERE ::
 
mtippin. The best advice on repeating fields is DO NOT USE THEM!
In your case, set up a separate file for your dates. Use the EventID as the link field and use a portal to display the dates, using the vertical scroll bar to limit the amount of screen real estate you need.

Cheers,
Paul J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top