Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

It a fast one--Variable counter +1

Featured Replies

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

Use the SerialIncrement() function.

  • Author

Sweet!!! I not familiar with that fuctions. Thanks worked like a charm. :

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.