April 11, 200223 yr My quotes are correct i was just trying to distinguish the field names. As for exiting the script, i don't want it to exit even if the circumstance is true, i want it to keep looping through the rest of my found records.
April 11, 200223 yr OK, let's try it with some sample data: Let's say that: Record 1: Months Due = 1 Record 2: Months Due = 2 In both records, Months = 3 Due = "" The first record should return {result}: Loop . Set Field(Months Due, Months Due + 1) ... {1 + 1 = 2} . If(Months Due = Months) ... {2 3} .. Set Field(Due, "Due") ... {""} . End If . Go to Next Record, Exit after last End Loop The next record should return: Loop . Set Field(Months Due, Months Due + 1) ... {2 + 1 = 3} . If(Months Due = Months) ... {3 = 3} .. Set Field(Due, "Due") ... {Due} . End If . Go to Next Record, Exit after last End Loop Everything looks right to me! All I can say is insert a bunch of Pauses in your script and see what's going on after each step. Another option would be to use a couple of Replace commands instead of a loop. You'd have to test to see if it was any faster.
April 12, 200223 yr Author I have this step in script: Loop Set Field("Months Due" , "Months Due" + 1) Go to Next Record, Exit after last End Loop This works to increment my months by one, however when it reaches a certain referenced number (my field "Months"), i need a "Due" field box checked. So, i added this step in the loop before the Go to Next Record: If("Months Due" = "Months") Set Field("Due", "Due") End If (the second Due is my value field for "Due") When i did this it made each record = it's "Months" (instead of +1) and checked the "Due" box. What am i doing wrong??
April 12, 200223 yr Hi, try an Exit Loop If step in there. Loop Set Field("Months Due" , "Months Due" + 1) Exit Loop If [Months Due = Months] Go to Next Record End Loop
April 12, 200223 yr Looks right to me. Are you typing in the script steps or constructing them by selecting fields and calcs? Because this: Set Field("Months Due" , "Months Due" + 1) ... should look like this: Set Field("Months Due" , "Months Due + 1") ... and this: If("Months Due" = "Months") ... should be: If("Months Due = Months") Only difference is placement of quote marks.
April 19, 200223 yr Author Oh, i see what you are saying... i read it wrong at first. I have what you said , and it does look right, however, for some reason, it make all my records = the months and checks them as due. (instead of just one upping the number) It doens't look like it should do that but, it does. any body else have a suggestion or see the prob? Thanks!
April 20, 200223 yr Again, I suggest: insert Pauses in your script and see what's happening after each step as you go through the loop.
April 20, 200223 yr Author Sorry... i've been out of town... But i don't want the records to add to each other. They are independent of each other.
April 20, 200223 yr Let me hazard a guess: when you added in the If steps, did you create them by duplicating and dragging? If so, have you mistakenly left some of the steps unadjusted? For all the records to change, you must have an If test that is always true - something like If (Due = Due) SetField (Months Due, Months) SetField(Due,"Due") Instead of If(Months Due = Months) SetField(Due,"Due") This is so easy to do when scripting quickly and dragging a step you already used. I've done it many a time...
Create an account or sign in to comment