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

Conditionally declare default value of token prompt

Started by marre, 28 Jul 2015 04:46:08 AM

Previous topic - Next topic

marre

Hello Everyone,

I have a Value Prompt which uses a token paramater p_token as Use Value. Now I want to change the default value of the token based on a query calculation/boolean variable. Is this possible?

IF Query calculation = condition 1 then:
p_token w/ Default Value 1

IF Query calculation = condition 2 then
p_token w/ Default Value 2

I have already tried putting 2 hidden value prompts on the report page and rendering just one of them using the query calculation as render variable, but Cognos just picks up the first value prompt on the page...

bdbits

It sounds like you are already using #prompt macros? Also, syntax is going to vary depending on whether you have a relational or dimensional package.

marre

Yes, I'm already using a token for the prompt query, but I also would like to use 2nd token for the default value. The goal is to have this token pass a different default value based on some condition (in this case a simple count on a dimension).

I'm using a dimensional model/cube btw.

bdbits

Is this visual i.e. something the user has to see, or can the default be determined in the report? The 2nd will generally be much easier.

With dimensional, you are basically manipulating MUNs in expressions so more information is definitely needed. You'll at least need to provide the expressions you currently are using for the prompt macros and the query calculation you want to use. It will be messy looking. :)