how tow write the if condition to check the two local variables are equal or not ?
Discussion posts and replies are publicly visible
For verifying the equality of two local variables. One such method is:
a!localVariables( local!var1:10, local!var2:20, if(local!var1=local!var2,true,false))
a!localVariables( local!variable1:3, local!variable2:3, if( local!variable1 = local!variable2, /* True condition - Variables are equal */ "Variables are equal", /* False condition - Variables are not equal */ "Variables are not equal" ) )
we use the if function to compare local!variable1 and local!variable2. If the two variables are equal, the true condition is executed, which in this case displays the message "Variables are equal." If the variables are not equal, the false condition is executed, displaying a different message.
You can modify the actions in the true and false conditions according to your requirements. The key part is the comparison, which is done with the = operator.
I highly recommend the public Appian documentation. Specifically this part: https://docs.appian.com/suite/help/23.3/parts-of-an-expression.html
You do not need the if() statement here. It's unnecessarily verbose. You can just write it like this:
a!localVariables( local!var1:10, local!var2:20, local!var1=local!var2 )