AnsweredAssumed Answered

Loop exiting early

Question asked by j.wegner on Nov 13, 2009
Latest reply on Nov 13, 2009 by j.wegner


Loop exiting early


Hi all,


I have a loop set up, that is performing another script.  The loop is set to exit when a variable reaches a certain value.  The variable is increased by 1 inside of the script that is performed by the loop.  My problem is that the loop is exiting early.   Here is a copy of the necessary code :


Main Script(Loop Portion)



       Exit Loop If[$$NewDate >= NewEndDate

       Perform Script["AddNewVacationInfo QCG"]

End Loop

do some stuff


AddNewVacation QCG(just the important stuff)


Set Variable[$a; Value: 1]


      If[$a = $Day]

             do some stuff

             Set Variable[$$NewDate; Value: $$NewDate + 1]

             Exit Script []

      End If

      Set Variable[$a; Value: $a + 1]

End Loop




To be more specific, the loop is ending when $$NewDate is 4 and $$NewEndDate is 31.  I know that these are the values, as I am watching them via the script debugger. Clearly, 4 is not greater than or equal to 31..  so my loop shouldn't be exiting.    Any ideas?




J Wegner