Jump to content

Resetting Serial Numbers


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

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 7613 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.