Variables in {IIF(,,)} Statments.
Posted: Tue Dec 03, 2019 7:36 pm
Hi, I am having an issue with using variables.
I have a basic statement like this:
{IIF(column=='N',Variable=Variable+1,Variable+1)}
I feel this may be the incorrect way to use a variable because it seem the IF statement executes both sections if the statement is false.
For example, if column equals 'N', the result is a increasing variable by 1, But if "column" is not equal to 'N', the statement executes both sections of the IIF clause, first incrementing itself my one, and then adding 1 again for the displayed output.
I was hoping it would just skip over the first section, but it seem to execute both parts of IIF statement no matter what.
I have a basic statement like this:
{IIF(column=='N',Variable=Variable+1,Variable+1)}
I feel this may be the incorrect way to use a variable because it seem the IF statement executes both sections if the statement is false.
For example, if column equals 'N', the result is a increasing variable by 1, But if "column" is not equal to 'N', the statement executes both sections of the IIF clause, first incrementing itself my one, and then adding 1 again for the displayed output.
I was hoping it would just skip over the first section, but it seem to execute both parts of IIF statement no matter what.