Forum Discussion

GeorgeRomanows1's avatar
GeorgeRomanows1
Qrew Member
3 years ago

If statement to check for numeric

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
------------------------------

1 Reply

  • 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
    ------------------------------