Over 46,000+ Business Solution Developers Find answers, ask questions, and connect with our community of business solutions developers, business owners and partners.
FileMaker loop scripts will cycle a set of script steps over and over again until it receives an indication to exit the loop. Scripts with loops are one of the main ways to have FileMaker perform tedious tasks on a set of records. Not only can they save time from performing tedious tasks, they also can ensure the data being processed is in the same format. Many times doing repetitive and redundant data entry, the data entry person will make a mistake strictly out of boredom.
The most common ways to exit a script loop include…
Exit Loop If Script Step – allows you to use a calculation to exit the loop
Go To Record [ Next, exit after last ] – exits the loop after the last record in a found set
IF script step – put into the loop to run the Exit or Halt script step. However, this method is a little sloppy and normally means the developer wasn’t aware of what the Exit Loop IF script step was for.
HOW IT IS USED
Usually a loop statement will also include the “Go To Next Record” script step. In most scripts it is START LOOP, PERFORM ACTION ON A RECORD, GO TO NEXT RECORD (exit loop if you are on the last record, END LOOP.
COOL IMPLEMENTATIONS OF IT
I guess the first cool implementation I saw as in a solution that deleted duplicate records. The script would find duplicate records, sort them by the duplicate criteria, the loop through each record keeping the first new instance but deleting all the following duplicates.
Got To Know Factor – 9