If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

calculation that returns boolean

Started by bucky, 09 Oct 2009 02:24:17 PM

Previous topic - Next topic

bucky

Does framework manager support returning boolean values for a calculation? I'm trying to do something like this:

if (...)
then (true)
else (false)

But it's invalid.

angela

It absolutely should work.  The problem might be with your actual calculation or where you're putting it - directly in the SQL or in a Calculated Column.

blom0344

AFAIK an if then else will always yield a value (whether 0/1 or any other combo) Since it will return either 1 of the values you can treat it like a Boolean I guess

rockytopmark

#3
True and false are just strings in context for which you are using them.  Your syntax is invalid since you don't have single quotes around the string values.

If(...)
Then('True')
Else('False')

As Blom suggested, treat it like a boolean, but it will not be a true boolean in the data type sense.