I am new to WTX, this question might have an easy answer. Since ISNUMBER() only test against 09, it cannot process my input data properly.
INPUT:
42.183
NONREACTIVE
787
.24
20120225 18:00
34.83
0.23
Output
42.183 is a number
NONREACTIVE is NOT a number
787 is a number
.24 is a number
20120225 18:00 is NOT a number
34.83 is a number
0.23 is a number
I had to use the following mapping to get the output, is there an easy way to do this ?
=IF(ISNUMBER(IF(FIND(".", TEXT(TEXTTONUMBER(In1)))!=0, SUBSTITUTE(TEXT(TEXTTONUMBER(In1)),".",""), In1 )),In1+" is a number",In1+" is NOT a number").
WTX PI zip attached. Thanks for any suggestion.
Topic
This topic has been locked.
4 replies
Latest Post
 20121210T20:58:14Z by JasonJava
ACCEPTED ANSWER
Pinned topic Is there an easy way to determine whether the input field is a number ?
20121114T00:39:49Z

Answered question
This question has been answered.
Unanswered question
This question has not been answered yet.
Attachments
Updated on 20121210T20:58:14Z at 20121210T20:58:14Z by JasonJava

ACCEPTED ANSWER
Re: Is there an easy way to determine whether the input field is a number ?
20121114T16:05:09Z in response to JasonJavaThe easy way is to let the type tree do the work. See attached example (wtx8.4)  drop these files into your existing Examples folder. The tree uses a choice group to distinguish between the numeric and nonnumeric items, and this allows you to easily identify them in your map rules.Attachments

ACCEPTED ANSWER
Re: Is there an easy way to determine whether the input field is a number ?
20121210T14:44:28Z in response to JasonJavaI think you can try this way too
IF(ISNUMBER(LEAVEALPHANUM(Input))
Exmaple :
3.456 it will check for alphanum i.e "" & "." = 3456 . Then it will check for 3456 = it is number field.
ACCEPTED ANSWER
Re: Is there an easy way to determine whether the input field is a number ?
20121210T20:55:59Z in response to SystemAdminThanks, I have tried that before using
=IF(ISNUMBER(LEAVEALPHANUM(In1)), In1+" Y", In1+" N").
Since it has 20120225 18:00, the result for that one is incorrect.
42.183 Y
NONREACTIVE N
787 Y
.24 Y
20120225 18:00 Y
34.83 Y
20 Y
0.23 Y 
ACCEPTED ANSWER
Re: Is there an easy way to determine whether the input field is a number ?
20121210T20:58:14Z in response to SystemAdminThe simplest one works for me is
=IF(CSIZE(TEXT(TEXTTONUMBER(In1)))>0, In1+" Y", In1+" N")
