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


Rate this function:  

  Average rating: 4.1  (38 votes)
  Discuss this Custom Function

Joshua Beckett & Anton Anderson, The Wine Curators

Creates a unique, never to appear again number

Sample Input:
Sample Output:

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


Creates a unique 13 digit number based on year, day of year and time; result will always be 13 digits
EXAMPLE: may 23, 2010, 1:48 PM (and 3 seconds) = 2010142134803
Use to generate unique numbers (for IDs, identifiers, etc) within a solution without the need ever to check for duplicates, because there can only and ever be one instance of the year, day of year and exact time, including seconds.
[**NOTE: Intended for a single-user environment.
Filter ( Get ( CurrentTimestamp ) ; "0123456789" ) gives you almost the same result (e.g. 624201010157) but will not sort as well as UniqueNum (2010175130157); also, UniqueNum will always result in the exact same number of digits, which, for some purposes, is critical]

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

thanks for these notes. i have now included a note indicating this is intended for a single-user environment.

Joshua Beckett, Los Angeles
June 24, 2010 3:12pm

@ Darren: Great suggestion!
@ Bart/Brian: We wrote the function for a run-time app, so it was only expecting a single-user environment, where sorting was a key requirement. While not at the level of a UUID, this function did the trick.

Anton Anderson, Altadena, CA
June 24, 2010 4:12pm

Computer clocks are *not* reliable. They require routine updates to maintain accurate time. If your computer syncs via a time server you may not even realize that your time was automatically adjusted backwards one minute. Records created individually aren't too likely to obtain a duplicate key, but records created via import increase the probability.

When it comes to database integrity, why take the chance? I'd highly recommend that you use Ray Cologon's excellent Base36 uID custom function instead.

Dave Graham
Bit Tailor, LLC

Dave Graham, San Diego, CA
June 25, 2010 12:32pm

I'd recommend you to use the uUID instead of this or of the Base36 uID. It can be packed into any file and is very fast in creation - and the probability that you encounter two identical numbers is veeeeery low :-)

Martin D. Brunner

Martin D. Brunner, Zürich
July 01, 2010 2:31pm

Hello, all,

Mr. Brunner and Mr. Graham are right, for there are situations where FileMaker could generate from two up to 'n' records within a single second — it depends mostly on CPU speed and scripting. If you add FileMaker's own Record ID to your CF, then it should generate unique numbers. It's redundant, though: for one could use FM's record id preceded by several zeroes, such as Right ( "00000" & Get ( RecordID ) ; 5 ).
The notion of using date and time data for id-ing a record is quite old, and has to do with the possibility of retrieving such data through a calculation (ergo without the need of specific date and time fields).
I, for one, rely on Ray Cologon's Base 36 uID CF for generating unique IDs.
Check his website, especially the demo section — — for he has unique and ingenious ideas and a deep knowledge of FM and CF.
Good luck.

Edward Souza, Victoria
August 15, 2010 12:03am

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 2 + 3 =
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