Im trying to create a field that looks at a field - [List], searches for the 5th character and if the character is a number, returns "check" and if its an alpha returns "leave"
2001A lorry would be "Check"
234566 car would be "Leave"
I split the first 5 characters into a [sublist] field and tried this but i keep getting an error and its really inefficient
WHEN ENDSWITH([sublist], "0") THEN "Check"
WHEN ENDSWITH([sublist], "1") THEN "Check"
// continue until 9
Any help would be appreciated.
Use the MID function to extract the 5th character.
Use the INT function to convert that character to an integer. If it's a letter, it will fail conversion and return a null. So, check if it's null and if it is, it's a letter, if it's not null it's a number.
IF ISNULL(INT(MID([mystring],5,1))) THEN 'leave' else 'check' END