November 1, 20232 yr Hi, I am new to UUID in FileMaker. In the past, I used serial numbers as my primary key, but now I want to use UUID as my primary key. However, in the layout I want to create a display ID and retrieve other information because UUID is too long and unusable. How can I use UUID in the relationship, and use display id to retrieve the information from another table. Thanks. KC 1ToManyRelationship.fmp12
November 1, 20232 yr So what is the point of using UUID? You cannot use a value to to retrieve information from another table unless the same value is stored in (some) records of the other table. In your example, the customer's orders would also have to store the customer's display ID and you would need (another?) relationship matching the two. So again, what is the point of having UUIDs if you find them unusable?
November 1, 20232 yr Author The scenario is for the files to be in two iPads and need to be imported to the main file in the server. And also for displaying a readable id for layout. Thanks so much for your reply. KC Edited November 1, 20232 yr by Spidey
November 1, 20232 yr You can display the readable ID on both layouts. You just cannot use it to retrieve information from another table - nor should you need to. Note that if the readable ID is a serial number, then it must be assigned only when importing the records into the main file. So if you have a sales person in the field collecting new customers and taking their orders, the new customer will not know their ID until the sales person has returned and the collected data has been imported.
November 1, 20232 yr You could consider base64 like YouTube url scheme if you want a shorter "display id" that could be used as a key.
November 1, 20232 yr If I am not mistaken, anything shorter than 22 characters will no longer be UUID.
November 1, 20232 yr Yes I would agree in this sort of thing one database would have to be the source of truth to generate such a value to verify uniqueness. I am using something sort of like this to send a link to a user to their invoice, makes the url shorter to keep our SMS messages terse.
November 1, 20232 yr 34 minutes ago, Ocean West said: one database would have to be the source But that's not possible if customers and their orders are generated in the field by iPads disconnected from the server. The key must be generated then and there. It is possible to replace the original UUIDs with serial numbers immediately after importing the field-collected data into the central file. But there is no real advantage in doing so. A serial number can serve perfectly well as the "readable ID", while behind the scenes the original UUIDs continue to serve as the keys.
November 2, 20232 yr Author Dear All, Thank you for all your suggestions. I found a solution but it's not very professional. I still use UUID to retrieve information and use serial display ID. I have the Display ID overlap the UUID drop-down menu. I have the Customer ID clear when the user clicks the down arrow in the drop-down menu to select customer. If there is another way to do it use the drop-down menu. Please let me know. Thanks. 1ToManyRelationship_2nd.fmp12 Edited November 2, 20232 yr by Spidey
November 3, 20232 yr Ideally, if you are dealing with an offline database that requires to be synced you should look at MirrorSync https://360works.com/filemaker-sync/ Here all relationships would be connected via UUID and once you collect data and sync you can have the server assign an ID number (human-readable) after sync occurs. OR the other option is to namespace your serial numbers per device by iPadA = 10.##### iPadB = 11.##### iPhoneA = 12.##### Example: http://docs.360works.com/index.php/MirrorSync_6_advanced_topics#What_if_I_need_to_assign_a_user-friendly_serial_number_to_my_records_that_stays_the_same_when_it_is_synced.3F_For_example.2C_an_invoice_number.3F This would be necessary if you send the user an email / or issue an enumerated customer-facing ID. But if you are offline, I am not sure how you send or issue it.
Create an account or sign in to comment