Brian Dunning's FileMaker Custom Functions

IsUUID ( text )

Checks if a text string is in UUID format, e.g. generated by Get(UUID).

  Average rating: 4.3 (31 votes) Log in to vote

John Hanson   John Hanson - Show more from this author
Pulp Studio
https://www.pulpstudio.com

Share on Facebook Share on Twitter

  Sample input:
IsUUID ( "random text" )
IsUUID ( "37EEAC77-E584-8642-A026-5BA61C66DDB1" )
IsUUID ( "" )
  Sample output:
0
1
0

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Returns a Boolean result of True if the text string matches a UUID generated by Get(UUID). Useful for validating UUID-based ID fields with direct data entry, e.g. with drop-down lists for type-ahead lookups.

Credit to Daryl Eisner for additional hex filtering.

 

Comments

Daryl Eisner   Daryl Eisner, San Diego
Oct 15, 2014
Very nice and simple. Like it.
Maybe add this to the end of the function:

"and Length ( filter ( Lower ( text ) ; "abcdef0123456789-" ) ) = 36"
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: