Skip to main content
Question

Checking if characters in a text string are all numeric

  • January 10, 2020
  • 0 replies
  • 56 views

Looking for ideas for how I might check each individual character in a text string to ensure its a number.    If all characters are numbers the result should be 'true'.   If even 1 character is not numeric then the result should be 'false'

------------------------------
Scott Pugh
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
This seems to work for me to validate the field called [data entry].  A blank entry will also qualify as being OK using this formula.

var text DataEntryConvertedToNumberAndbackToText = ToText(ToNumber([data entry]));

$DataEntryConvertedToNumberAndbackToText = [data entry]
and
Length($DataEntryConvertedToNumberAndbackToText)= Length([data entry])

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------