Does anyone have any idea why the following formula doesn't work? I'm trying to return the last 6 numeric characters from a phone number. I know there are other ways to do it, but am not sure why the IIF statement isn't evaluating correctly. It seems to return "true" regardless of whether the character is numeric or not. The same example works fine with an If...Then...Else instead of an IIF.
Local NumberVar i:=1;
Local StringVar PhoneVar;
While i<=length({Customer.Phone}) do
(
IIF(IsNumeric({Customer.Phone}), PhoneVar:=PhoneVar+{Customer.Phone}, PhoneVar);
i:=i+1
);
Right(PhoneVar,6)
Thanks in Advance!
Local NumberVar i:=1;
Local StringVar PhoneVar;
While i<=length({Customer.Phone}) do
(
IIF(IsNumeric({Customer.Phone}), PhoneVar:=PhoneVar+{Customer.Phone}, PhoneVar);
i:=i+1
);
Right(PhoneVar,6)
Thanks in Advance!