Question about $and

Why does this return 0?

$if($and(true,true), 1, 0)

I expect it to return 1.

Try it again without those spaces after the commas. They can cause problems. Also 'true' is intended to represent an expression in the documentation.

You are missing the logic operation that is to be joined by the $and().

$if($eql('true','true')$and($eql('true','false')),1,0) will return 0
$if($eql('true','true')$and($eql('true','true')),1,0) will return 1

BTW: "true" has no special meaning (e.g. keyword) but is just a string.

Obviously you are testing the logical function $and() with two strings, this will not work.
You have to supply boolean values as parameters.

Try this ...

Action: Format value Field: TEST Formatstring: $if($and($eql(1,1),$eql(1,1)),'yes','no') ... should give 'yes' Formatstring: $if($and($eql(1,11),$eql(1,1)),'yes','no') ... should give 'no'

... and this ...

Action: Format value Field: TEST Formatstring: $if($and($eql('true','true'),$eql(1,1)),'yes','no') ... should give 'yes' Formatstring: $if($and($eql('true','true'),$eql('yes','no')),'yes','no') ... should give 'no'

DD.20160630.1522.CEST