Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
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 )