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

Selecting display value instead of use value in a drop-down.

Started by erics, 05 Nov 2015 05:10:55 PM

Previous topic - Next topic

erics

Hi there,
I'm working with badly written existing code. There's a drop down list based off of a table that has a display value and a use value.
Is there a way to pull the display value? I'd rather not alter the code, because of how unnecessarily complicated the code is.

Eric

cognostechie

When you say you are dealing with a bad code, is that a code or a report you are referring to? If it is a code then I don't know how bad it is but your post definately
is a bad one. What do you mean by 'pull the display value' ? What's the intention? A drop-down list is referred to as a 'Prompt' and it can be pointed to use any data item as a display value as long as that data item is in the query. There should not be any need to alter any code for that.

erics

I say that the code is a mess because there are 41 queries for 1 report with 1 table and 3 drop-downs. And that's just the beginning of the fubar that these reports are.

The issue is that the drop down prompt has the parameter mapped to the first value in the query which is the use value. It however displays the second value in the query, which is the display values. Is there an easy way for me to access the display value?

MFGF

Quote from: erics on 06 Nov 2015 09:14:17 AM
I say that the code is a mess because there are 41 queries for 1 report with 1 table and 3 drop-downs. And that's just the beginning of the fubar that these reports are.

The issue is that the drop down prompt has the parameter mapped to the first value in the query which is the use value. It however displays the second value in the query, which is the display values. Is there an easy way for me to access the display value?

Is it just for display purposes? If so, you can use a layout calculation with a paramDisplayValue() function. To get the Use Value it would be a paramValue() function.

Not sure if this is what you need, though?

Cheers!

MF.
Meep!

cognostechie

Quote from: erics on 06 Nov 2015 09:14:17 AM
I say that the code is a mess because there are 41 queries for 1 report with 1 table and 3 drop-downs. And that's just the beginning of the fubar that these reports are.

The issue is that the drop down prompt has the parameter mapped to the first value in the query which is the use value. It however displays the second value in the query, which is the display values. Is there an easy way for me to access the display value?

A prompt can be mapped to TWO values, the USE value and the DISPLAY value. Click on the prompt and on the left side you will see the Properties. Both the values are mapped there and can be easily changed. If the purpose is to display the DISPLAY value in the report column then the data item which is being used for that can be pointed to DISPLAY value. If the purpose is to display the DISPLAY value in the report to show what was chosen from the Prompt, then do what MFGF suggested.

It's hard to understand what the need is.