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.

reset serial number via script step

Featured Replies

I have created a script to build IP addresses when creating a network. The script utilizes a field called IPserial which is set to auto enter a value starting at 1 and incrementing by one until it reaches 254. these make up the last digits of the IP address. However once all number have been generated i would like to reset the initial value to 1 so the next network i build i can simply run the script.

My question then becomes: Is it possible to reset the auto enter serial number via a script step?

thanks in advance for any help

Hi jhomer,

Under Fields script-steps, see Set Next Serial Value.

Specify Field - yourSerialField and just put a 1 in the calc box. wink.gif

LaRetta

Or you could use a calculation of:

Mod ( IPserial - 1 ; 254 ) + 1

This way you can let IPserial run on, while the result will loop between 1 and 254.

  • Author

thanks

I am having a problem setting the serial via a script. The script steps where I try to do this are:

Go To Record/Request/Page [First]

Set Next Serial Value [Table::Serial; Table::globalfield]

Replace Field Contents [No dialog; Table::Serial; Serial numbers]

But it ignores what I set and just uses whatever is in the entry dialog already, and it doesn't matter whether I use the "Custom Values" or the "Entry Options" setting (I also notice that the 'update entry options' box stays greyed out - I'm not really sure why, and actually I'm not sure what the Entry Options is supposed to do, it really isn't described in the online help at all).

It is a problem to try to set this with a globally stored field? And what is "Entry Options" and how do you use it? What am I doing wrong?

"Entry options" means that you want to use the currently set "Initial value" and "Increment by" in the field definition.

Set Next Serial Value[] first, then Replace Field Contents[] with "Entry options" should work. It's hard to say what you're doing wrong without seeing the actual dialog box entry.

BTW, it's not necessary to go to the first record. Just make sure all the records you need are found and in the desired order.

To my knowledge, Set Next Serial Value will only effect the records you create after using the step. To update existing ones, I would use something like

Replace Field Contents[ No dialog; Table::Serial; Table::globalfield + Get(RecordNumber) - 1]

Set Next Serial Value[Table::Serial; Table::globalfield + Get(FoundCount)]

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.