AnsweredAssumed Answered

Script loops endless (because it can't delete records?)

Question asked by R12GS on Jul 26, 2010
Latest reply on Sep 17, 2010 by R12GS

Title

Script loops endless (because it can't delete records?)

Post

This post was (perhaps incorrectly) titled "OSX Script doesn't run on WinXP (FM11)"

(Sept16, 2010)  I'm pretty sure it is a permissions issue, not platform issue.  Please see post #3 below.

Hello,

I have a script that has been running for years on OS X, but trying to run it today from a Win XP; it seem to get stuck in an endless loop.  The winXP machine has FMPro 11.  OSX machine has FM11 Adv.

Can someone give me a hint which script steps might be incompatible with WinXP?  Or where can I find a list of differences between WinXP and OSX (to get a hint which step is causing the problem).


THANKS!!!

===================================

Set Error Capture [ On ] 

Sort Records [ Specified Sort Order: backorders::part; ascending ] [ Restore; No dialog ]

Go to Record/Request/Page

[ First ]

Loop If [ IsEmpty(backorders::part) ]

Delete Record/Request

[ No dialog ] If [ IsEmpty(backorders::po_history) ]

End If Set Field [ backorders::po_history; GetAsNumber(backorders::PO_Number_extract) & " (" & GetAsNumber(backorders::

quantity) & ") " ]

End If Exit Loop If [ Get(RecordNumber) = Get(FoundCount) ] If [ backorders::part = GetNthRecord( backorders::part ; Get(RecordNumber) + 1) ]

Else

Set Variable [ $recnum; Value:Get( RecordNumber ) ] Go to Record/Request/Page

[ Next ] Set Field [ backorders::po_history; Trim(GetNthRecord( backorders::po_history; Get(RecordNumber) - 1)) & " " &

GetAsNumber(backorders::PO_Number_extract) & " (" & GetAsNumber(backorders::quantity) & ") " ] Set Field [ backorders::quantity; backorders::quantity + GetNthRecord( backorders::quantity; Get(RecordNumber) - 1) ]

Go to Record/Request/Page [ $recnum ] [ No dialog ]

Delete Record/Request

[ No dialog ]

Go to Record/Request/Page [ $recnum ] [ No dialog ]

Go to Record/Request/Page

[ Next; Exit after last ]

End If End Loop

Outcomes