You need to sign in to do that
Don't have an account?
sfg1
How to check whether field value is numeric or Alphnumeric in apex
how to find field value whether it is numeric or Alphnumeric in apex.
I have requirements like if FIELD1 = 123, FIELD2=456, display FIELD1 value in OUTPUTFIELD=123, if FIELD1=A123 or 123A, FIELD2=456 then display FIELD2 value in OUTPUTFIELD=456.
Please guide me.
I have requirements like if FIELD1 = 123, FIELD2=456, display FIELD1 value in OUTPUTFIELD=123, if FIELD1=A123 or 123A, FIELD2=456 then display FIELD2 value in OUTPUTFIELD=456.
Please guide me.
It will give false for -ve values.
Exp :
String str1 = '-12';
String str2 = '12';
System.debug('is numereci >> '+str1.isNumeric()); //false
System.debug('is numereci >> '+str2.isNumeric()); //true