Is_number() equivalent

i am getting the input value from the flat file. i am reading all the column values and have to load in the target table only if it is a number. Can i know is there any built-in function to validate or handle this.

Hi @Mari

The isNan() function can tell you if the value is a number or not. Usage is like this:

isNaN(“4”) = false

isNaN(“foo”) = true

you can then use parseInt(“4”) to get the number 4 if needed

There are some parseInt() and isNaN() functions that you may find useful.

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438183/Global+Functions+and+Properties#GlobalFunctionsandProperties-parseInt

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438183/Global+Functions+and+Properties#GlobalFunctionsandProperties-isNaN

Thanks. It helps.