### isnumber Function

Posted:

**Mon Jul 13, 2015 1:57 pm**Is there a comparable function to isnumber in GAD? I'm trying to base an if statement on whether the variable returned is a number (0-9), I've tried this:

${decimal(fnameChar)==1 OR decimal(fnameChar)==2 OR decimal(fnameChar)==3 OR decimal(fnameChar)==4 OR decimal(fnameChar)==5 OR decimal(fnameChar)==6 OR decimal(fnameChar)==7 OR decimal(fnameChar)==8 OR decimal(fnameChar)==9}

but it fails with this error: [8099 - print] An unexpected error occurred. Function 'Decimal': Parameter '1' must be a number. Function definition: 'Decimal(number) returns decimal'

I assume it's because the variable fnameChar is a 't'. I was hoping it would say 'well, "t" is not a 1 or 2 or ect. . .' and carry on.

Any advice on this? thank!

${decimal(fnameChar)==1 OR decimal(fnameChar)==2 OR decimal(fnameChar)==3 OR decimal(fnameChar)==4 OR decimal(fnameChar)==5 OR decimal(fnameChar)==6 OR decimal(fnameChar)==7 OR decimal(fnameChar)==8 OR decimal(fnameChar)==9}

but it fails with this error: [8099 - print] An unexpected error occurred. Function 'Decimal': Parameter '1' must be a number. Function definition: 'Decimal(number) returns decimal'

I assume it's because the variable fnameChar is a 't'. I was hoping it would say 'well, "t" is not a 1 or 2 or ect. . .' and carry on.

Any advice on this? thank!