Brian Dunning's FileMaker Custom Functions

IsNumeric ( text )

Is the string numeric? (is it a number?)

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

Kyle Williams   Kyle Williams - Show more from this author
Augusto Digital
https://www.youtube.com/channel/UCpJlB7cmVNMjbjgY96MEsng

Share on Facebook Share on Twitter

  Sample input:
IsNumeric ( "125 dollars")
IsNumeric ( "125.00")
  Sample output:
0
1

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

Sometimes you need to verify that a serial number is numerical before merging 2 tables to avoid errors, Sometimes you just need to verify that a dollar value was entered as a number and not as "$102.00" or "102,00" or "102.00."

 

Comments

Witschi   Witschi, Medio-Ingeno AG
Oct 6, 2021
nice, but it does not support negative values
 
Kyle Williams   Kyle Williams, Augusto Digital
Oct 7, 2021
Thanks Witschi, I added the negative symbol to the filter..
 
Jeremy Baran   Jeremy Baran
Oct 20, 2022
I also appended these two "and" clauses at the bottom, otherwise a non-numeric text with two or more dashes or a dash in the middle of the text would return 'True' instead of 'False'.

and PatternCount( text; "-" ) < 2
and If(PatternCount( text; "-" ) =1;Left(text;1)="-";1)
 
Kyle Williams   Kyle Williams, Augusto Digital
Oct 24, 2022
Thanks @Jeremy Baran, I have added your suggestion to the formula!
 

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: