COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: blom0344 on 04 Oct 2007 10:28:02 AM

Title: associate a fields description to a prompt
Post by: blom0344 on 04 Oct 2007 10:28:02 AM
Is it possible to build predefined prompts in Framework Manager and associate the description (on a 1 to 1 relation with prompt field) to the prompt?
This was quite easy with the competition where it was possible to show for instance the code and description in a dropdown box.

Example:

Code          Description

abc            alphabet


From the reporting tool alphabet is selected , but the actual code is used in the query..
Title: Re: associate a fields description to a prompt
Post by: MFGF on 04 Oct 2007 10:55:02 AM
Hi,

In Framework Manager, select the query item for your code, then in the properties section at the bottom, open up the +Promptinfo property and define the prompt type as 'Select Value' and the Display Item Reference as the Description field.

Regards,

MF.
Title: Re: associate a fields description to a prompt
Post by: blom0344 on 05 Oct 2007 10:35:56 AM
Well, that does not seem to work. Actually in my test the code is a numeric type and the description (that comes from the same table) is of course a string.
Just changing the setting you mention does not trigger a prompt of any kind.
Title: Re: associate a fields description to a prompt
Post by: MFGF on 05 Oct 2007 11:23:28 AM
Hi,

The mechanism is that whenever the code is used in a filter with a parameter (either coded in a studio or added within Framework Manager), even though the code is numeric, you get a value prompt displaying the descriptions (normally a numeric value would result in a text box prompt being generated).  When a description is selected, the corresponding code is passed back to the filter.

By the looks of things, the only bit you are now missing is the parameter filter.  In FM, you can either embed it into a query subject, or define it as stand-alone so the authors can choose whether or not to use it in their studios.

Regards,

MF.
Title: Re: associate a fields description to a prompt
Post by: blom0344 on 05 Oct 2007 04:22:06 PM
MF,

I added the filter to the query subject that holds the code object.
When I add this into report studio I am prompted to fill in a value. However, I is still asking for numeric input and does not show any values.

Furthermore, when I drag the description query item into a report the same prompting is activated.

I have set the prompt settings on the code query item as you described.

The object in my test are in different namespaces. Is that relevant?

Thanks in advance..
Title: Re: associate a fields description to a prompt
Post by: blom0344 on 09 Oct 2007 08:32:20 AM
The following construction seems to work:

1. Define standalone filter with prompt expression:
[model].[Test].[XCode] = ?Select a description?
2. Set prompt type details on Code to:
         prompt type             : Select Value
         display item reference: [model].[test2].[description]
         use item reference    : [model].[test].[Xcode]
3. Drag the standalone filter into the report

This produces the correct behavior, but only when the filter is added as an additional object in a report.

To be precise: This works for RS, but does not work in QS..