April 16, 200322 yr Hi, Can I reset an auto-entering serial number back to 1 with a script? Thanks, Dan
April 16, 200322 yr 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."
April 16, 200322 yr Author 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
April 17, 200322 yr 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
April 17, 200322 yr 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)
April 21, 200322 yr 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.
Create an account or sign in to comment