From Dwayne Wright PMP
Certified FileMaker Developer
Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit. For the best experience, please visit the journal directly by clicking (here).
FileMaker doesn’t have a built in way to always go to the previously created record. You can go to a previously viewed record or the previous record in the found set. This may or may not represent the same order in which records were created. Here is a way to script a method of going back to the previously created record. This can be helpful in script loops that have to take a creation order timeline into consideration.
- Have a primary key in number format
- Have a calculation field that takes the current primary key data minus 1
- Create a self relationship between the two fields (previous to current)
This gives you a relationship from the current record to the previously created record regardless of the sort order. You can then use either a GTRR action or the Go To Record via a calculated value script step.
© 2010 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.