Hi All,
I am importing some data from csv file. I need to validate some columns where the values should be numeric. I need to check the value if it is not numeric, then I need to throw an error. Is there an easy way in X++ to do this? I am using the below method, but it is returning false in case of real values:
boolean isNumeric(str strToValidate)
{
boolean ok = true;
;
ok = (strlen(strToValidate)) == strlen(strkeep(strToValidate,'1234567890'));
return ok;
}
Thanks,
Baber.
*This post is locked for comments