FileMaker Pro Function Review – Auto Enter Serial Number
This is where we left off the last time. We will use the same contact file. Please note that we have added a Get ( UUID ) auto-enter serial number with conditional formatting added and shown in blue.
Why a UUID serial number. As an example lets say we have 5 sales people working outside the office using iPads to take orders. Upon agreement from customers they present the contract, swipe the credit card, get the signature on the iPad. The serial number is auto entered. There location does not provide wifi and in addition they are in a mobile telephone dead area. The order they just finished has been logged in by FileMaker go as order number 101. In the interim another salesperson has the same circumstance and his order has been registered in FileMaker go as 101. Another sales person has an order that was received by the main office and FileMaker has auto entered that sales order as number 101. Can’t happen you say. What if that company has 50 sales people. What are the odds over a years time now.
Get(UUID) returns a unique 16-byte (128-bit) string representing a universally unique identifier. Using Get(UUID) each of the above orders would have auto entered a different and unique serial number that could have been turned into the corporate office at the end of the week, if necessary, and not have created a duplication problem.
Please note that in the manage data base table fields view, we now have two match fields. The original named CONTACT ID MATCHING FIELD is a number field. The new one named CONTACT ID MATCHING UUID FIELD is a text field and has already been created.
Lets see the set up:
Just as we created the original CONTACT ID MATCHING FIELD (see blog dated January 29, 2015) and then clicked on options which exposed the options for field “CONTACT ID MATCHING UUID FIELD”.
[clear ]We are now working with a text field that will be auto-entered by calculation. Auto-Enter is highlighted as is Calculated value and Do not replace existing value (if any). Click on the Specify… button to continue.
When the Specify button is clicked FIGURE 1.4 appears.
[clear ]The calculation dialog allows us to provide a calculation to apply to our auto enter field. The Get (UUID) function is chosen.
We are working in a flat data base, “a solution with only one table and no relationships”. If we were working in a solution with lots of relationships the context box at the top becomes extremely important. Covered in depth in FTS beginner and advanced.
The OK button is clicked and we move to validation.
[clear ]Note the highlights in blue. Only during data entry, Allow user to override during data entry and Unique Value are chosen. We click on OK and the CONTACT ID MATCHING UUID FIELD is ready to use. If your solution will be used on mobile devices that cannot always be connected to a server, you may want to consider UUID serial numbers.
Setting up the auto-enters can be a simple get function or a more involved calculation. There is an option for most any need. The next blog will deal with an auto-enter calculations that is a little different and very useful.
Auto-enter functions will be continued next time…thanks for reading.
– Bob
Bob Kelley
FileMaker 13/12 Certified Developer
The Scarpetta Group, Inc.
bob@scarpettagroup.com