chuckcou Posted August 6, 2008 Posted August 6, 2008 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
chuckcou Posted August 6, 2008 Author Posted August 6, 2008 Sweet!!! I not familiar with that fuctions. Thanks worked like a charm. :
Recommended Posts
This topic is 5954 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now