Boolean Values/Logic in Velocity?
Hello,
Curious what I'm missing when it comes to boolean data types in Custom Objects. We're importing through the API into a Boolean data type with a 1 (TRUE) 0 (FALSE) approach. Also noticed it seems if the value is NULL, Marketo calls it "false".
With this in mind, why does this not work:
#foreach ($item in $customerCardList)
#if ( ( ($item.AuthorizedUserOnAccount.equals("0")) ||($item.AuthorizedUserOnAccount.isEmpty()) ) && ($item.cardTypeDetails.equals("SIGNATURE")))
No Authorized User
#else
I can't script apparently.
#end
#end
If I understand, if I am looking for a "false" Boolean value I see if it is a 0 OR an empty value. When I test the above against a Lead with a record that matches the above - it still gives me the "else" output.
Is there some other way to account for a false Boolean value? Or is it better to play against a TRUE value, like "if X IS NOT 1, show this"?