Need dynamic field name in "IF" statement
I need to evaluate in an IF statement based off one of several fields. I know I have made this work before, but can't seem to remember. I have many flag fields, for example, Flag_1, Flag_2, and Flag_3. I want to evaluate the expression based on the field name and the script parameter. Here is the code..
IF[ "Flag_" & Get ( ScriptParameter )=1]
Set Field By Name ["Flag_" & Get (ScriptParameter);0]
Set Field By Name ["Flag_" & Get (ScriptParameter);1]
The "Set field By Name" parts work fine, but not the "If" statement. Of course the script parameter is just a number like 1 or 2.