Jump 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.

Featured Replies

I have an automatic numbering field that uses the serial number option.

I would like the user to be able to reset this serial number to (1) without having to access the DEFINE FIELDS dialog box.

Is there a script I can produce to do this?

Thanks!

You could use the Replace function.

Place your cursor in the serial number field, then go to Menu - Records - Replace (Cmd = on a Mac)

It can also be script to a button.

BTW, hope these numbers have no effect on relationships, etc.

HTH

Lee

smile.gif

also...make sure you SORT before you repleacing anything...if you records are sorted to some previous need those serials migh be of...so:

1

4

7

8

if you repleace it with 1---1000 they will carry:

1

2

3

4

5

6.....

which, as Lee said can trigger a LOT of truble and especially if you relations depend on it.

All the best!

There is a script step, Set Next Serial Value. Point it to your serial number field, and put 1 in for the calculation.

You have to be aware that resetting the serial number, while leaving the numbers for existing records, does not make a lot of sense usually.

Any relationships based on it will fail, because you're going to have duplicates.

That script step is usually used after deleting all records, to begin again fresh. Or after importing data into a clone, to update a file.

In the later case it's usually used like this (my field is "SeriaID", the original file is "Data.fp5"):

Set Next Serial Value ["SerialID", "GetNextSerialValue ("Data.fp5", "SerialID")"]

Lee's method of using Replace could "reserialize" all the numbers, for existing found records (should be all in this case).

What exactly are you trying to do with this?

Well,

Besides Lee's last commentary about relationship, I must say I always wondered why we would ever let the user set these kind of things....and when we would have to use this script step apart when developping the db !

Hi Ugo,

I'm for locking them users out completely, it sure would save us a lot problems and make our jobs a lot easier.

smile.gif

Oh, oh, just remember that won't work, frown.gif after all, that's why they pay us the BIG BUCKS. Besides, I guess they do need to have limited access to enter things such as names, addresses, phone numbers, etc.

So, if they want a serial number that they can control, then give them one. ONLY, just make sure it has nothing to do with how the files work.

smile.gif

Create an account or sign in to comment

Important Information

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

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.