DanBrill Posted April 16, 2003 Posted April 16, 2003 Hi, Can I reset an auto-entering serial number back to 1 with a script? Thanks, Dan
Fitch Posted April 16, 2003 Posted April 16, 2003 Yes, the script would first isolate the record that will be number 1, then Replace, and in the replace options you can choose to "Update serial number n Entry Options."
DanBrill Posted April 16, 2003 Author Posted April 16, 2003 Thanks Tom, But this only seems to work if I uncheck the "Prohibit Modification of Value" box in the field definition. I'd like to leave that checked so that it can't be accidentally modified by the user. One idea is to change the field format so that the user can't enter the field, but that also prevents them from searching by the ID number. Any ideas? Thanks again, Dan
Ugo DI LUCA Posted April 17, 2003 Posted April 17, 2003 Hi, Depending on your structure, you still can replace the "find" by a scripted "GTRR", or use another layout for finds, with a global field. Then the script will go Enter Find Mode Set field (your serial num, global field) Perform find
slstrother Posted April 17, 2003 Posted April 17, 2003 Have you tried the Set Next Serial Value script step?
cjaeger Posted April 17, 2003 Posted April 17, 2003 to prevent mod in your serial number field: a) use a calc field, stored, sn2 =serialNumber. never place the serialnumber field directly on layouts (exept developer layout that is). prevent entry into serialnumber on every layout. make your serialnumber field a button with a script checking for the mode first (if mode= find, go to field serialnumber)
Fitch Posted April 21, 2003 Posted April 21, 2003 slstrother is more awake than me: Set Next Serial Value is of course what you want, this feature was added in FileMaker 5.5. Look in the Scriptmaker commands near the bottom of the list.
Recommended Posts
This topic is 7890 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 accountSign in
Already have an account? Sign in here.
Sign In Now