April 14, 200817 yr 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.
April 14, 200817 yr 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.
April 14, 200817 yr 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.
Create an account or sign in to comment