Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

UUID ( Type )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 3.8  (56 votes)
  Discuss this Custom Function

Tom Robinson, Kōwhai Computing
http://www.tomrobinson.co.nz/

Generate a Universally Unique Identifier (UUID)

Sample Input:
UUID ("4h")
Sample Output:
f47ac10b-58cc-4372-a567-0e02b2c3d479


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

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 12 comments

Jens: the comments in the code header under ‘Requires’ clearly state the NumToHex dependence.

Claus: the comments in the header under ‘Caveats’ clearly state version 1 can return duplicates if called multiple times a second—this is the only situation where it is ‘useless’.

The Author, Aotearoa New Zealand
February 24, 2012 1:45pm

We had the same issue that Claus Lavendt had. With V1 it creates duplicates, not unique UUIDs.
V4 works.

So dont use V1!

Bachmann Support GmbH, Zurich
March 02, 2012 12:54am

Version 1 would be great if it wasn't for the fact that Filemaker's time resolution only operates in seconds.
In e.g. Java, the time resolution operates in miliseconds, which makes version 1 to a great approach, as you also will be able to know which device created the record.
So stick to version 4, when using this in Filemaker.
Just as a note, one of my colleagues created a test, where he created nearly 4 million records. ALL had unique ID numbers !
This was with version 4.

Claus Lavendt, Denmark
March 14, 2012 6:18am

but, anyway, thank you Tom for creating this very useful CF and for sharing it with us !

Claus Lavendt, Denmark
March 14, 2012 6:20am

Note in FileMaker 12 and later there is now a builtin function get(uuid).

The Author, New Zealand
March 02, 2015 12:38pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 8 + 9 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions