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".
Creating Unique Serial Number
2 posts
• Page 1 of 1
Posts: 2
Joined: Tue Sep 14, 2004 11:36 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
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.
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 |
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests