AnsweredAssumed Answered

Conditional Auto-Increment on non-standard value

Question asked by AmberSaundry on Jan 17, 2012
Latest reply on Jan 17, 2012 by philmodjunk

Title

Conditional Auto-Increment on non-standard value

Post

Hi all,

Sorry but I can't quite find what I am looking for in manuals or in the forum - I apologize if this post is repetitive.

I have a collection of plant specimens, each previously assigned with an Accession Number - this is a unique identifier of the specimen in the collection.  Each number is prefaced with the letter "B" (ie: B1, B2, etc.).  We are in the process of entering all these specimens into our Filemaker database into a text field "Accession Number", because to go through the existing collection it can be entered on a random basis (ie: entering all the specimens of 1 species could have specimens assigned B1, B4, B834, B21323, etc.).

However, for new collections we'd like to assign the Accession Number as they are entered.  So if this field could have a checkbox beside it that says "Auto-increment", and have the number automatically increment from the previously selected record upon new record creation, that would be ideal.  So that when we go back to adding in older collections, we can again enter them manually on an as-need basis.

Is there a script or calculcation I can write for this, so that when a checkbox is selected the number auto-increments (and it needs to have the 'B' preface), but when it is unchecked it can be manually entered?

Thanks again,
Amber

Outcomes