Shane Posted October 29, 2001 Share Posted October 29, 2001 I'd like to write a script that generates an alpha numeric serial number that is only one higher than the last record. When I use the auto enter function from The "define fields" dialog box, new records show the next absolute serial number (from some library I suppose), not one higher than the last record. Help, and thanks Link to comment Share on other sites More sharing options...
Garry Claridge Posted October 29, 2001 Share Posted October 29, 2001 The Auto-Enter Serial Number will increment to the next number. You can have alpha characters, such as 'quote1' and the Auto-Enter will create 'quote2' for the next record. Hope this helps. Garry Link to comment Share on other sites More sharing options...
Shane Posted October 29, 2001 Author Share Posted October 29, 2001 Garry, Thanks, but my problem is that I am trying to write a script in my main file that will go to a number generator file, create a new record-serial number, and return to the main file and paste it into a serial number field, IF it is empty. ELSE, execute a sub-script that deletes the number generator file record containing the new serial number. That works fine, but when I execute the script that goes back to the number generator, the next new record gets a serial number that ignores the fact that I deleted the previous record, and gives what should have been the next value, had I not deleted the record. Link to comment Share on other sites More sharing options...
Vaughan Posted October 29, 2001 Share Posted October 29, 2001 In FMP 5.5 there is a script step that can reset the "next value" for the serial number. This'll do what you want. On the other hand, why not reverse the process: only run the script if the serial number field is empty. That saves creating/deleting the record in the first place, and the solution will work with any version. Link to comment Share on other sites More sharing options...
Shane Posted October 30, 2001 Author Share Posted October 30, 2001 Thank You Vaughan. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 8208 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