Brian Dunning's FileMaker Custom Functions

GetVersionAsNumber ( Version )

Converts a software version number to a decimal number regardless of location

  Average rating: 4.4 (34 votes) Log in to vote

Eilert Sundt   Eilert Sundt
Eilert Sundt Systemdesign
http://www.eilert.no

Share on Facebook Share on Twitter

  Sample input:
GetVersinAsNumber ( "10.456" )
  Sample output:
10,456 ( Norwegian system)
10.456 ( US system )

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

With FileMaker having made the jump to double-digit version numbers,
testing for the correct FM version has just got a bit more difficult
if you're outside of the US. In earlier versions, we could filter out
the numbers from the Application Version and read the leftmost digit
to get at the "main" version number, but that won't work anymore. So,
we would like to get the number portion of the Version string as a
true decimal number, which is what this CF does.

 

Comments

Rob   Rob, East Hampton , Ct
Aug 26, 2009
Would

Abs(Get ( ApplicationVersion ))

Do the same thing?
 
Eilert Sundt   Eilert Sundt, Hammerfest, Norway
Aug 26, 2009
If you're on a US system, yes - but if your locale does not recognise the point (".") as a decimal separator it won't. That's the whole point (pardon the pun) of the exercise: in large parts of the world the comma is used as the decimal separator.
 

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.

Under construction. Email me your wish list for improvements.