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

Making a prompt optional and required based on condition

Started by Cognosuser2019, 05 Nov 2015 03:03:36 PM

Previous topic - Next topic

Cognosuser2019

Hi All,

Is it possible to make the same prompt optional and required based on a condition?

I have a Type Prompt with the values Monthly and Fiscal Year. When Monthly is selected it should show Month prompt which is mandatory. When Fiscal year is selected Month prompt should be hidden. But since it is marked as required filter in query even when it is hidden for Fiscal year when finish button is clicked it pops up a window to enter value for month.....

I don't want that to happen....but when monthly is selected it should let user to select one value and not leave it optional....

bdbits

Out of the box, I cannot think of any way to do that. But if you are familiar with javascript and on 10.2 or later, I think this could be done using the Prompt API.

https://www-01.ibm.com/support/knowledgecenter/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.ug_cr_rptstd.10.2.2.doc/c_prmpt_api_overview.html%23prompt_api_overview

You need some javascript experience, and docs are not great but an experienced javascript developer should be able to figure it out. It's a bit too complicated to go into here as there are too many situation-specific parameters on how to get it working.