April 20, 200124 yr I am trying to write a script that changes one value to another, but only in a condition. here is the script: Go to Record/Request/Page [First] Loop If ["state="california" "] Set Field ["state" , "state="CA" "] Go to Record/Request/Page [Next] End If Exit Loop If ["Status(CurrentRecordNumber) = Status(CurrentFoundCount)"] End Loop This seems to go infinitely and when I cancel, all the values are zero. Also, How do I set a variable? As this script shows, I need to change the parameters each time I want it to find a state, or write a script for each state. I would ultimately want to write a script with each state set as a variable, and loop through the entire database. Is this the best way? Any help with this problem would fantastic. Rich
April 20, 200124 yr If you want to use variables, why not try a slightly different approach. Create two global fields to act as set find variable fields. I'll call them gstatelongname and gstateabrev. Once you enter the state you are looking for in gstatelongname and enter the abreviation to be used in gstateabrev you could perform a script such as: Enter Find Mode set field State gstatelongname Perform Find Replace [state, Replace date:Calculation:, gstateabrev] no dialog
April 20, 200124 yr The problem with your script is that the "Go to Record/Request/Page" step is inside your If..End If. As soon as you reach a record without state = california, you will be stuck on this record forever. Move this statement below the End If. -bd
Create an account or sign in to comment