August 6, 200817 yr My question is an easy one, but I am stuck--Newbeeeee : Below is my code, but in short [color:green]I have a variable that I assigned this number--($Counter;)=0000001 I want it to count up one number to 0000002. It counts, but strips out the 0's and just gives me 2. [color:red]How can I have it give me 0000002? Thanks for your time Chuck P.S. How do you copy a script to paste into this board? I had to print as a pdf then do a copy and paste Show All Records Sort Records [ Specified Sort Order: zipcodes::StateandCityCalculation; ascending ] [ Restore ] Go to Record/Request/Page [ First ] Set Field [ zipcodes::StateandCityID; "0000001" ] Set Variable [ $Counter; Value:zipcodes::StateandCityID ] Set Variable [ $StateandCityCalculationName; Value:zipcodes::StateandCityCalculation ] Go to Record/Request/Page [ Next ] Loop #If Calculation matchs then copy Variable Number If [ zipcodes::StateandCityCalculation=$StateandCityCalculationName ] Set Field [ zipcodes::StateandCityID; $Counter ] Else #If Calculation does NOT match then add 1 to variable and set field Set Field [ zipcodes::StateandCityID; $Counter+1 ] Set Variable [ $StateandCityCalculationName; Value:zipcodes::StateandCityCalculation ] Set Variable [ $Counter; Value:zipcodes::StateandCityID ] Go to Record/Request/Page [ Next; Exit after last ] End If End Loop
Create an account or sign in to comment