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

Passing text for Null Value in VALUE PROMPT

Started by chinnucognos, 03 Dec 2014 10:35:46 AM

Previous topic - Next topic

chinnucognos

Hello everyone,

I have requirement that in place of null value in Value prompt we need to insert text value.
Suppose, Value Prompt has values as ProductA,ProductB,      , Porduct C.
For that null value in above scenario, user wants to insert text.

please help how to overcome this.


thanks in advance.


Deal with it!

Lynn

Quote from: chinnucognos on 03 Dec 2014 10:35:46 AM
Hello everyone,

I have requirement that in place of null value in Value prompt we need to insert text value.
Suppose, Value Prompt has values as ProductA,ProductB,      , Porduct C.
For that null value in above scenario, user wants to insert text.

please help how to overcome this.

thanks in advance.


I'm not sure I understand the requirement. Where is the null coming from? Is this something in the database that is coming up in the query that feeds your prompt control so the user sees a blank line among the other valid selections? If that is the case you could use a coalesce function to replace the null with something else.


cognos810

Hello Chinnucognos,
What Lynn suggests is correct. If the user is able to enter a text lets say "Product Z", what will it then be used for? You cannot apply it to a query filter as that would not return any records because your database does not have any such values. If it had such a value, then it would have showed up in the prompt box in the first place. If your requirement is to ONLY display something like "Products not available", then in the data item that populates the prompt UI, you can use the coalesce function, as Lynn suggests, to override the NULL value with the "Products not available" text.
However, if you want greater flexibility on what Text needs to be displayed on the report in case a NULL product is encountered, which needs to be entered by the user, then you can do this.
Create a text box prompt. Then using render variable conditionally render this text box prompt. The condition to meet would be ParamValue('ProductPrompt') <> ''. You may make the product prompt as auto-submit or provide a reprompt button for the user to click on after s/he has selected the NULL value in the product prompt.

-Cognos810