UUID ( Type )
Rate this function: Average rating: 3.2 (29 votes) Discuss this Custom Function
Tom Robinson, Kōwhai Computing
http://www.tomrobinson.co.nz/
Generate a Universally Unique Identifier (UUID)
Sample Input:
|
Sample Output:
| f47ac10b-58cc-4372-a567-0e02b2c3d479 |
|
Description:
This custom function generates a Universally Unique Identifier (UUID) in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (or the same sans hyphens). e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479.
The advantages of using a UUID over a serial number is there’s no need to worry about the next value of a serial number or a serial number collision, forinstance when importing records. The downside is they’re rarely appropriate to expose to a user.
UUID example: Dick and Harry both create records in their own copies of a database. Each record needs a unique serial number so they can be combined at a later date. After a total of 68,719,476,736 (2^36) records are created the probability of a collision is 0.0000000000000004 (4 × 10^−16)
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:5 most recent comments | Show all 11 comments Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:
|
Newest Custom Functions:
| 1. |
list.intersect (listA; listB) |
| |
(Mon, May 14, 12:43pm) |
| 2. |
WeekStart ( weekOfYear ; year ) |
| |
(Sat, May 12, 8:42am) |
| 3. |
PercentToWords (FIELD) |
| |
(Thu, May 10, 3:16pm) |
| 4. |
PercentToText (FIELD) |
| |
(Thu, May 10, 2:37pm) |
| 5. |
StripReserved( text ) |
| |
(Wed, May 02, 6:05pm) |
| 6. |
ListBaseTables |
| |
(Wed, May 02, 3:48pm) |
| 7. |
ValidEmail( theEmail ) |
| |
(Wed, May 02, 7:27am) |
| 8. |
UltraDate (Text; LongDate_or_DateDigit) |
| |
(Wed, May 02, 6:07am) |
 |
|
Create a simple DB with only one field.
Set AutoEnter UUID ( "1h" ) and create a loop script like this:
Loop
ExitLoop If ( Get ( TotalRecordCount ) > 15000 )
New Record
End Loop
Search for duplicates and in my tests I found around 748 records, that were not unique.
This makes version 1 useless....
Tried the same approach with version 4 and even increased to 250.000 records.
No duplicates....
So either there is a bug in the calc or FM has a too low tome resolution for this.
Claus Lavendt, Denmark
February 23, 2012 1:58pm