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

Cognos Textbox/Value prompt with alternate value

Started by juffin, 17 Oct 2013 02:21:43 PM

Previous topic - Next topic

juffin

Hi,
I'm new to Cognos.  I have a value prompt page which displays two values - Male,Female
But in back end they are stored as 0,1 respectively. But when user selects Male the report should fetch all the records with value 0
and viceversa. Any idea how this can be done?
Thanks in adv
Jf

calson33

When you create a prompt, you have a "Use Value" and "Display Value" (see properties of the prompt)
Your display values should be "Male" and "Female", while the use values should be 0 and 1.

juffin

Thanks Calson that's working for Value prompt, but if it's a text box prompt if user types 'Male' how will it fetch data for value 0 in backend.

bdbits

You're going to ask them to type in a choice? Well, ok, you would inspect the value in your filter expression, probably force to upper or lower case and use an if statement. And what are you going to do if they enter an invalid value?

Why would you do that? Just use a value prompt; no ambiguity. It's better for you, it's better for the user. Win-win.