How will you use this value once generated?
A simple auto-generated serial number can be used to uniquely identify records without needing this random but not quite random value.
And in FileMaker 12, you have the option of using Get ( UUID ) to uniquely identify records.
I can think of at least two ways to do this, but hesitate to suggest either when there seems to be much simpler options for what you want that do not require generating this type of value.
Thanks for the rapid reply.
What i trying to do is get a custom made iphone app to scan a number and locate that number from the filemaker database and bring back the data relating to that ID back to the iphone.
But why does this require a Random number for the ID code?
I thought that this seems the most logical way? like i said im quite new to filemaker what would you suggest?
It seems to me that the key detail is that the ID number must be Unique, not that it be random. Note that you have to make sure that a given ID is not used more than once.
How will your app work?
Will this value need to be unique for all records on this one iPhone or must it be unique over records distributed over several different devices?
If it need be unique only for the records on a single iPhone (or a single database that the iPhone(s) connect to as clients via 4G or WiFi), an auto-entered serial number field is all you need. This remains the simplest, most reliable way to get a unique identifier--what we call a "primary key".
If these records may be distributed over several different devices, a text field with an auto-enter calculation that enters Get ( UUID ) will be the better option.
Yes thats exactly what i meant haha sorry Primary Key
The app will scan a number off of something and hopefully locate the ID number in the databse and bring back the data to the iphone.
It will need to unique over records distributed over several different devices.
I'm trying to remove the need to enter data into the database could you send me a demo off the auto-enter calculation or point me towards a download?
I cannot, but you simply need define a text field in your table and use the following expression as an auto-entered calculation in Field Options for that field:
Get ( UUID )
This requires the latest version of FM Go. FileMaker Go 11 does not have this option.