AnsweredAssumed Answered

Loop through fields not working

Question asked by jackmac on Jun 13, 2018
Latest reply on Jun 14, 2018 by jackmac

Hi all,


I have a script which checks through a client record.  There are three date fields on each record.  My loop is looking to find if the date is less than 30 days away, if it is create a record in another table:


Screen Shot 2018-06-13 at 18.00.44.png


It searches through MOT, Service, LOLA and Tacho - the four date fields.  On a record if runs through the order shown (MOT, Service etc.).  When it gets to the last field, it moves to the next record then loops until the final record where it exits.  All works fine apart from on a record if there are two fields which meet the criteria it will only record the first one it finds.  I set one record to have an MOT due then another record to have an MOT and a service.  It only found the MOT on each record.


How can I get it to check all of the criteria even if it finds something as it has?


I've tried to loop on the individual record but that is taking a huge amount of time as it loops four times for each record obviously.


Is there an easier way?


FileMaker Pro Adv 15