August 21, 200718 yr I need to look at the last character of a field and know whether it is alpha or numeric. Can anyone help me out on this?
August 21, 200718 yr This calculation will give you a 0 if it is Alpha, and 1 if it is numeric. GetAsBoolean ( Right ( YourField ; 1 ) ) Lee
August 21, 200718 yr Well, not really - that is if you consider zero to be a numeric character. Try instead: IsEmpty ( Filter ( Right ( Yourfield ; 1 ) ; "0123456789" ) )
August 21, 200718 yr Hi comment, Good catch. I tested it on every thing except a zero in the last position. Can you possibly explain to me why FileMaker will filter it out as numeric, but not see it as numeric? Lee Edited August 21, 200718 yr by Guest
August 21, 200718 yr Filter() is a text function - you can put any characters into the filterText parameter, and Filemaker will use them without considering any other meaning they might have in another context. The fact that Filter ( text ; "0123456789" ) leaves only numeric characters is pure coincidence as far as the Filter() function is concerned. OTOH, GetAsBoolean() is a logical function. It evaluates the data parameter as being either TRUE or FALSE. Zero is evaluated as FALSE, same as empty.
August 21, 200718 yr Hi comment, Oh. Doh. Now I understand why. Thank you for your explanation, you have once again enlightened me, and it is appreciated. Lee
Create an account or sign in to comment