No parameters for this function.
Uuid Primary Key
UUIDRandom creates a numeric universally unique identifier suitable for use as a primary key in FileMaker number fields. The UUID uses random digits instead of a timestamp and node address. This may be required in some situations to preserve the anonymity of the device that generated the UUID.
UUIDRandom encodes the creation timestamp and several random digits as a single delimited integer. For most purposes, FileMaker will ignore the hyphen "-" in number fields; they are only readability aids.
This function generates UUIDs that are meaningfully sortable. UUIDs will first sort by version (non-random, then random), then by creation timestamp.
This function creates a (decimal) numeric UUID, which has performance advantages for file size and find speed in FileMaker. This can be converted to a more conventional text string UUID with the UUIDGetAsRFC4122( uuid ) function, which converts the integer into the conventional hexadecimal representation of an RFC 4122 UUID.
The creation timestamp can be extracted with UUIDGetTimestamp( uuid ).
* Creates a numeric universally unique identifier suitable for use as a
* primary key in FileMaker number fields. The UUID is composed almost
* entirely of random digits. This may be useful in some situations to
* preserve the anonymity of the conditions that generated 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 vice versa.
* A 41-digit delimited number of the form:
* The sections of the UUID correspond to:
* v: A UUID version (type) number
* r: A variant code reserved by the RFC 4122 standard
* n: Random digits, within certain bounds for compatibility with RFC 4122
* PARAMETERS: none
* DEPENDENCIES: none
* For most practical purposes, FileMaker will ignore the text delimiters
* in values returned by this function.
* These functions generates UUIDs that are meaningfully sortable. Values
* sort by version, then creation order, then node (creation device).
* This function creates a (decimal) numeric UUID, which has performance
* advantages for file size and find speed in FileMaker. The value can be
* converted to RFC 4122 canonical form (hexadecimal) with the
* UUIDGetAsRFC4122 function.
* MODIFIED on 2011-02-02 by Jeremy Bante to use a format with a bijective
* relationship with the RFC 4122 format.
* CREATED on 2010-12-02 by Jeremy Bante <http://scr.im/jbantetsg>.
* Key values Best Practice: http://filemakerstandards.org/pages/viewpage.action?pageId=557138
* RFC 4122 standard UUID specification: http://tools.ietf.org/html/rfc4122
* UUID functions: https://github.com/jbante/FileMaker-Techniques/tree/master/CustomFunctions/UUID
//v-r-mmm mmm mmm mmmTsss ssss-ccccc@nnnnn nnnnn nnnnn
"4-2-" //version and reserved variant code
& Right ( "000000000000" & Floor ( Random * 165208454460 ) ; 12 ) & "-"
& Right ( Random ; 7 ) & "-"
& Right ( "00000" & Floor ( Random * 16384 ) ; 5 ) & "-"
& Right ( "000000000000000" & Floor ( Random * 281474976710656 ) ; 15 )
This function is published on FileMaker Custom Functions
to check for updates and provide feedback and bug reports
please visit http://www.fmfunctions.com/fid/288
Prototype: UUID.Random( )
Function Author: Jeremy Bante (http://www.fmfunctions.com/mid/260)
Last updated: 13 May 2011