Creating Unique Serial Number

Questions and suggestions for the CC Calendar product.
Posts: 2
Joined: Tue Sep 14, 2004 11:36 am
PostPosted: Tue Sep 21, 2004 10:12 am
I'm trying to create a series of serial numbers, each related to another field plus an increasing number (e.g., PO1001-1, PO1001-2, PO1001-3, etc.), where the identifier "PO1001" is retrieved from another record and the -1, -2, -3 and so on are incremented and added onto the identifier (PO1001-1, PO1001-2, etc. will be in a separate field from the identifier).

We can't seem to get the GetNextSerialValue function to work properly, even using the Help screen's exact example. The syntax is GetNextSerialValue(fileName; fieldName). We can't get the calculation to accept the name of any open table for "fileName".
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Sep 22, 2004 12:38 pm
Hi,

You might want to take another tack here and use a second field for the actual auto-enter serial number. You'd then have another calculated field add the "PO1001" prefix.

This allows you to rely on FileMaker's internal generation of serial numbers without having to script them yourself. This method will, however, leave gaps in your serial numbers if you delete records, much as a checkbook has gaps if you void a check. To get around this you can prevent deletion, having users void records instead.

We can't get the calculation to accept the name of any open table for "fileName".


I believe you have to put the file name in quotes or use the status(currentfilename) function to retrieve it from the current file.

John
John Sindelar
SeedCode

Return to CC Calendar (FM6)

Who is online

Users browsing this forum: No registered users and 1 guest

(855) SEEDCODE
[email protected]
Follow us: