Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5954 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.