Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can i know if a field contains only numeric values ?

I have a problem: i must know if a alphanumeric field contains only numeric value or not.

Please help me

Thanks

Claudio

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

You can use the below script in script level or in Chart.

1. if(Isnum(FieldName),'Num','Text')

or

2. if(IsText(FieldName),'Text','Num')

Regards,

Joshmi

View solution in original post

6 Replies
Gysbert_Wassenaar

Add a Statistics Box object for the field and add the Numeric Count and Text Count statistics. Then check those counts.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

try to work with purgechar

you may convert your field to upper case string

if (purgechar(yourstring,'0123456789ABCDEF')='',1,0)

1: only alphanumeric

0: other characters

Anonymous
Not applicable
Author

Hi try this

IsNum( expr )

Returns -1 (true) if the expression can be interpreted as a number, otherwise 0 (false).

Regards

Harsha

Not applicable
Author

Hi,

You can use the below script in script level or in Chart.

1. if(Isnum(FieldName),'Num','Text')

or

2. if(IsText(FieldName),'Text','Num')

Regards,

Joshmi

Not applicable
Author

Ok, I use the first:

=IF (IsNum( Warehouse_Map.DS_COLUMN),right('000' & Warehouse_Map.DS_COLUMN,3),Warehouse_Map.DS_COLUMN)

Thanks,

Claudio

Not applicable
Author

Hi Claudio,

Could you close this discussion , if you find the same as helpful  or correct.

Regards,

Joshmi