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

Populate prompt default selection from parameter map

Started by LDJB81, 16 Jan 2014 07:35:28 AM

Previous topic - Next topic

LDJB81

Hi all,

Is it possible to assign a default selection to value and tree prompts from a parmeter map? I want to assign different default selections based on whoever logs in to the report. I can imagine this might be tricky for the tree prompt!

Thanks
Lloyd

CognosPaul

There are a few ways. Which version are you using?

The easiest way would be to create a hidden prompt page. Stick all of your prompts in there, wrapped in HTML items that hide them with <div style="display:none"></div>. You would get the prompt values with a singleton, and select the option from there. Once the values have been selected, have the JS automatically send a "finish" or "next" action.

LDJB81

I'm using 10.1.1

Not sure I understand what you mean. I will explain what I have in more detail.

Prompt Page 1 has 2 prompts with have static choices. These results of these 2 static choices are then concatentated in token prompt (dynamic query subject selection) to filter the members displayed in a tree prompt on Prompt Page 2. The users want to go straight in to prompt page 2 without selecting anything on prompt page 1. Now my thinking was I could have a table with the user ID and 2 other fields which hold the default selections for each user and then have 2 parameter maps. Could I put the parameter map expression with $$ straight in to the default selection property? or maybe create a calculation in FM and reference that?

CognosPaul

If you have the values in a parameter map, then use those instead of the prompt. Can you share how you're filtering the tree prompt query now? It may be as simple as swapping out the prompts for the param maps.

Are you using the prompts anywhere else? Do the controls themselves need to have the values, or are they only used for filtering the tree?

LDJB81

Yes this is what I ended up doing, I merged the 2 parameter maps instead of using prompts. For the tree prompts, I made them optional, added the user specfic MUNS to the table and created 2 new parameter maps. I used these in the default selection part of a prompt macro and done away with the prompt pages. This works well, I have a dynamic default selection for each user but the problem is going to be maintaining the table going forward. I dont think the client will go for it but it was a useful excercise.

Prompt('pPrompt','MUN',$(PM{account.defaultname})