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

Prompt Page - Multiple Required Prompts (before Submit is enabled)

Started by dmburke11, 19 Dec 2013 09:09:24 AM

Previous topic - Next topic

dmburke11

Hi there -

I have a prompt page with multiple required prompts. However, as soon as the first required prompt selection is made, the Submit button is enabled.

Is there an easy way to keep the Submit button disabled until a given # of required prompt selections are made?

Thank you all and happy holidays.


bdbits

That's not the normal behavior. Do you have default selections/values for some of them? If so, the required prompts with defaults will be considered satisfied and Finish will be enabled as soon as you provide the other required prompts that do not have defaults.

dmburke11

Hi,

I should have added that there is a required prompt to select a 'report/filter type' of State, Account Number, Company Name...

based on this selection, it renders additional value prompts. If you select 'State', for example, you'll then see additional value prompts to select one or more states, cascaded to a city selection, etc.

I would like to require that a report type be selected but also that at least one state is selected, or one acct #, or one company, etc.

I believe that because the additional prompts are not rendered at the time, the fact that they are 'required' is negated.

Any thoughts? or a better way to accomplish this? can I do layered prompt pages instead?

Thank you very much.

navissar

Cool question.
Layered prompt pages would solve your problems. However, they are UGLY, and VERY old-fashioned.
The other way to go is to use Javascript to enable/disable the button, and show/hide the relevant prompts.
There are many ways to do so, but to get you started, I'm attaching a sample (Based on 10.1). This is a generalized solution I've been working on. There are a few wrinkles to iron, but it's usable.

HOW DOES IT WORK?
The basic structure is this:
1. a main prompt (named SELECTION) which is a radio button prompt in which the user selects the type of report. Each value in the prompt has a use value (I used enumerators: 1,2,3...) and a display value ("report by state","report by employee height" and so on...).
2. A "translation" prompt. Since when I wrote the script I didn't know which value selected in the main prompt triggers which prompts to be required, I use the translation prompt (named "connector") as a sort of parameter map. It has a value for each value in the main prompt. the use value is identical (So if a value in the main prompt is use: 1 display: report by state, the connector prompt will have a value with use value of 1), the display value is a comma delimited list of the prompts which are required when this selection is on.
3. A block for each value in the main prompt, named with the use value (So the name of the block for "1/State" is "1"). All prompts relevant for a certain selection will be put in this block, and blocks will show/hide based on the selection.
SO HOW TO USE IT?
Restore the XML. Change the main prompt to match your values. Change the connector prompt to match your required prompts. Add necessary blocks in the prompts div below.
make sure you keep naming conventions - it is VERY important: All prompt blocks must have the same name as the use value of a corresponding selection in main prompt. All required prompts must be named.
WHAT ARE THE LIMITATIONS?
1. No radio button/checkbox prompts are allowed except for the main prompt.
2. Required prompts must be of list box type.

Good luck!


dmburke11

Thank you Nimrod! I will give that a shot - very creative solution.