AnsweredAssumed Answered

Status field not updated during loop

Question asked by JeroenValkier on Mar 19, 2013
Latest reply on Mar 19, 2013 by philmodjunk

Summary

Status field not updated during loop

Product

FileMaker Pro

Version

12

Operating system version

OSX 10.8.2

Description of the issue

I wrote this script that creates records in the same layout that it loops over (see script code below). The only point where it fails now is at the point where I set the "Status" field of the active record to "New". The field value remains unchanged. The point where it updates the "Amount" field to the value of "15" in the newly created record works perfectly. It also loops nicely and ends when the $FoundRecords reaches "0".

Question: Why doesn't the "Status" field get updated?

=======
Go to Layout [ “Registrations” (Registrations) ]

Perform Find [ Specified Find Requests: Find Records; Criteria: Registrations::RegistrationID: “<30” ]
[ Restore ]

Set Variable [ $FoundRecords; Value:Get(FoundCount) ]

Loop
Go to Record/Request/Page [ $FoundRecords ]
Set Field [ Registrations::Status["New"] ]
New Record/Request
Set Field [ Registrations::Amount; 15 ]
Set Variable [ $FoundRecords; Value:$FoundRecords - 1 ]
Exit Loop

Outcomes