UUIDTimeNIC
Creates universally unique IDs suitable for use in FileMaker number fields.
Average rating: 4.0 (49 votes) Log in to vote
Jeremy Bante https://github.com/jbante/ |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Creates a universally unique identifier suitable for use as a primary key in FileMaker number fields. The UUID is an encoding of the creation timestamp, a serial number, and the PersistentID of the device that created the UUID. The values returned by this and related functions have a one-to-one correspondence with UUIDs following the RFC 4122 standard — all values in the format generated by this function can be converted to RFC 4122, and visa-versa.
This function generates UUIDs that are meaningfully sortable. Values sort by version, then approximate creation order. Because of the leading sort by version, random (version 4) values (where the creation order cannot be determined by the values) will cluster separately from timestamp-node (version 1) values.
The value can be converted to RFC 4122 canonical form (hexadecimal) with the UUIDGetAsRFC4122 function. The creation timestamp can be extracted with the UUIDGetTimestamp function.
This page originally posted the UUIDTimeNIC function, but that function has been deprecated because FileMaker Go running on iOS 7 no longer gets meaningful results from the Get ( SystemNICAddress ) function. This UUIDTimeDevice function should be used instead moving forward.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.