Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

FormCalc If Statement -- Shows no error, but still doesn't work

kkoenen
Level 1
Level 1
I have the following code, which, when I validate it, doesn't show any errors, and yet it isn't working:
//Generate Selector Code from Account Type
If (AccountType.rawValue eq 1 or AccountType.rawValue eq 3)
     then (SelectorCode.rawValue eq 147);
     elseif  (AccountType.rawValue eq 2)
     then (SelectorCode.rawValue eq 247);
     else (SelectorCode.rawValue eq 347);
     endif
Any ideas where I'm going wrong?
Thanks much
1 Reply
CJAllen-HDQGtR
Level 2
Level 2

You'll need to change the "eq" operators to "=", the assignment operator, in your "then" statements, as well as in the final "else." "eq" is the alternate form for "==", the equality operator.