Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: stonysmithOriginally posted by: Papazol
if (regexIsMatch(Bnr_P,"322412..112"))then {Bnr_P = "32212"} else Bnr_P
In your first statement, there is a syntax problem that is not caught by the system.
effectively, you have:
and instead you need one of these two:
if test then A=1 else A=2
or as you did:
A= if test then 1 else 2
====================
The IF operator in LAE is not quite the same as in other languages.. it can can be either a statement or a value. Your first attempt was mixing the two forms. Your solution that worked is using the IF as an operator that returns a value. Either way, you shouldn't mix the two forms.