AnsweredAssumed Answered

Field doesn't get updated during loop

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

Title

Field doesn't get updated during loop

Post

      

     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".
      
     My 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 If [ $FoundRecords = 0 ]

     End Loop

      

Outcomes