KelticGuy

Code gives spasmodic results

Discussion created by KelticGuy on Mar 16, 2017
Latest reply on May 15, 2017 by KelticGuy

Does anyone know why this piece of code works sometimes but not others? I am using FileMaker Pro13 Advanced.

It is as if there is a bug associated with the ≤ action.  The problem is spasmodic and happens like this , the code runs when I open the database, I can open it in the morning and it doesn't work and then when I open it in the afternoon it does even although nothing has changed i.e. neither the order date nor the current date are different.  So in the morning the DueFlag will be set to "No" but in the afternoon it will be set to "Yes" (although not always sometimes it works as expected).

 

 

#Check if order not due yet

Go to Layout [ “Orders” (SODD) ] Go to Record/Request/Page [ First ]

Loop

If [ SODD::OrderDate ≤ Get ( CurrentDate ) ]

Set Field [ SODD::DueFlag; "Yes" ]

Else

Set Field [ SODD::DueFlag; "No" ]

End If

Go to Record/Request/Page [Next; Exit after last]

End Loop

Outcomes