< Back

Document Subject: If Variable Comparison using Colon
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#IfColon or http://A555F9/nn.nsf/ByAlias/IfColon

Fed up of typing formulas like @if(bigvarname="dog" | bigvarname="cat" | bigvarname="horse"; @true; @false)? Here is a handy short cut.




 

Assuming bigvarname is a single item variable ( i.e. not a list )

@if( bigvarname="dog" | bigvarname="cat" | bigvarname="horse";

         @true;

         @false)

 

is exactly the same as:

@if( bigvarname="dog":"cat":"horse";

          @true;

          @false)