Keychain Expression

I’m trying to use a simple keychain expression that checks the value of a boolean and returns yes or no to the report. When I run the report, the expression doesn’t seem to evaluate. I’ve placed it below.

@manual_entry == “true”?“Yes”:“No”@

I’ve tried testing for both “true” and “1” with no success. This seems like a bug. I’m using version 7.9.5.

I am having similar issues but with basic arithmetic rather than ternary operators.

‘+’ concatenates ints, ‘-’ returns N/A with ints, ‘*’ returns N/A with ints

My mistake, the person that made our database apparently entered everything in as a varchar

1 Like

To clarify, I’m reading a value from a SQL database that is a “bit” type. When I run the report without the expression, the values “true” and “false” are returned.

Try a “1” but without any quotes.

I’ve tried that as well with no success. Yes is returned every time with the data source changing between true and false.

Try:

@manual_entry?"Yes":"No"@
1 Like

Perfect. That worked. Thanks!

I’m thinking this example needs to be added to the documentation. I was tripped up by this same thing a few weeks ago.

I was about to chime in, but you beat me to it. :slight_smile: