Brian Dunning's FileMaker Custom Functions

HexUUIDToNum_cf ( _uuid )

Converts a text based Get (UUID) to a 41 digit number

  Average rating: 3.0 (1 vote) Log in to vote

Christopher Gauntt   Christopher Gauntt
Cordega Solutions

Share on Facebook Share on Twitter

  Sample input:
HexUUIDToNum_cf ("DBB8EE4A-01F8-5B41-B598-4663A715E569")

HexUUIDToNum_cf ("00000000-0000-0000-0000-000000000000")

  Sample output:



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

This function concatenates the five segments of a Get (UUID) text-based hexadecimal, converts it into a fixed length decimal and then adds a preset value to make sure the result is a uniform 41 digit number that still functions as a UUID, with no leading or trailing zeros.

This is intentional for two reason:
1. the forced 1 at the end will prevent a scientific notation from returning if there happen to be too many zeros in a row at the end.
2. the forced 1 at the beginning will guarantee a fixed length value, which may be important when switching a system over from a serial number based uid to a numeric uuid

Feedback welcome.



Log in to post comments.


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

Under construction. Email me your wish list for improvements.