Software Venture Consulting

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

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


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:  

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

Tom Robinson, Kōwhai Computing

Generate a Universally Unique Identifier (UUID)

Sample Input:
UUID ("4h")
Sample Output:

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


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 Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it


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:
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 7 + 2 =
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. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
2. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
3. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
4. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
5. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
6. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
7. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
8. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)

RSS Feed of Custom Functions