Skip to main content
Question

If statement to check for numeric

  • February 7, 2022
  • 0 replies
  • 35 views

How do you check if a text data field only contains a number or is just numeric.
I have an address field that I need to perform an If statement such as:

If property address is numeric then set "Y" else set "N"


------------------------------
George Romanowski
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
not tested but try this 
var text TextConvertedToNumericAndBack = ToText(ToNumber(Trim([My Text field field])));

IF($TextConvertedToNumericAndBack = Trim([My Text field field])
and
Length($TextConvertedToNumericAndBack) = Trim([My Text field field]), "Y", "N")

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------