# Determine numeric??

Hi,
Can anyone tell me how can i determine that a field that is entered on map is numeric or not??
Also,
what will be the edit mask for checking whether the value entered in the field is in the format “nnnn.nn”

Thanks,
Sriram

How is the field defined on the Map? If for example it was defined as N5, the field must be numeric since Natural would not allow non numerics.

So, let us assume the field is A5. You could use the statement IF #A IS (N5) to determine if #A can be converted (using VAL) to an N5 format field. Or, you could use IF #A = MASK (NNNNN), however, a value of blank would not be acceptable as N. So unless the field must be filled, you probably want the IS test.

Assuming you have an A7 field, and assuming there will always be a value that fills the field, you could use MASK (NNNN’.'NN)

You could not use IS here. suppose the value was 123.456. This would pass an IS(N4.2) test.

You could also SEPARATE the field into #I #sep #D with RETAINED DELIMITERS. Then test the #sep for a decimal point, and then test #I for IS(N4) and #D for IS(N2)

steve