Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have seen the wisdom of providing a unique ID for each record in each table. I've seen it a little late though. I don't have any big problems yet, but I'd like to give unique serial ID's to more thatn 3000 records that are already created. I tried to do this using a script that looks like this:

Show All Records

Got to Record/Request/Page [First]

Loop

SetNextSerial Value [Patient_Info::PatientInfoID.pk; Patient_Info::PatientInfoID.pk+1]

Go to Record/Request/Page [Next; Exit after last]

End Loop

Unfortunately, this script skips more than 1000 records, begins with the serial number 3 rather than 1, and proceeds to label 3, 4, 7, rather than 1, 2, 3. I'm quite confused by this. Obviously, I've not done it right. Please help me to do it correctly.

Thank you.

Posted

The command to serialize records is the Replace Field Contents command (Records menu). It has an option for using a serial number (which looks much like the one in the Field definition dialog). If you do this in a field which is an auto-enter with serial number* field (which you should have, otherwise it is not going to provide new ones), there is an option to [x] Update serial number in Entry Options. That will set your "next" value for you.

Show All Records first, Unsorted. It will do them all. No Loop needed. The serial number field must be enterable on the current layout for this. But it should not be enterable for the users otherwise. It's best to have your own "developer" layout, hidden from users, for this stuff.

*The auto-enter serial number field can be of type Number or Text.

Posted

You dont need a script to do this. You can do it in browse mode.

First show all the records.

Then click into the PatientInfoID.pk field.

under the Records menu, select 'Replace Field Contents' and you will see replace with serial number.

Start it from 1.

Leave the option for update serial number in entry on.

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