First, let’s make a valid use case for this scenario.
OBIEE Dashboard Prompt object contains one or more user input controls. User can input values and submit them by clicking on “Apply” button. In newer releases of OBIEE there is support for auto submission of prompts depending upon your configuration.
Why we need to submit multiple prompts?
Consider below scenario.
You would like to give users a choice to select two different criteria’s for selecting products. You would like summarize results from first criteria as “Selection 1”, from second criteria as “Selection 2”.
These selections are reported in analysis for comparison.
Design 1
Below is a sample screenshot of dashboard that attempts to provide this functionality.
Issues with design 1.
- There are two apply buttons.
- User can only make one set of Brand & Product selections.
- Clicking on Apply button can submit only that prompt.
- Any changes made in the other prompt are simply lost and are not submitted to dashboard.
- So, this solution is a two step process. User submits selection 1, then selection 2.
- If users are not properly trained this would lead to confusion.
- Also there other cosmetic issues like analysis not aligning in dashboard properly.
Design 2
Since most of the issues are related to how Apply button works and prompts are submitted, it is obvious that only one prompt with both selection 1 & selection 2 inputs.
Issues with design 2.
- If users make a mistake and want to reset selections, both selections would be lost.
- May lead to confusion if several input controls are involved in each selection.
- Both selections are in prompt, so it will lead to confusion.
Conclusion: It appears that is not possible to submit more than one dashboard prompt in one click. Combining both selections into single prompt leads to confusion & bad UI.
Below is the solution I’m proposing.
Design 3
- Keep 2 separate prompts for Selection 1 & Selection 2. (Similar to design 1)
- Hide apply & reset buttons for these prompts.
- Create a third prompt that combines input values from Selection 1 & Selection 2. (Similar to design 2)
- Keep combined prompt in a separate section & hide using “display:none” in custom CSS.
- Add a custom buttons on dashboard for resetting Selection 1 & Selection 2 prompts.
- Add a custom “Apply” button, which is named as “Compare”.
- Write a JQuery script to move selected values from Selection 1 & Selection 2 to combined prompt. Submit hidden combined prompt.
Summary of Design 3 Solution: Individual Selection 1 & Selection 2 prompts are used for UI only. Compare button apply these selections in combined prompt. Since combined prompts is submitted, Dashboard gets are selections in single click. So, we have win-win situation. Dashboard has better UI, we are using very little custom code to make this happen.
Design 3 Implementation Steps
Prompts
Arrange Selection 1, Selection 2, Compare (Combined Prompts) as displayed above.
Hide Column 4, Section 1 by entering custom CSS code “display:none” in section formatting options. Select “Use Custom CSS style” option.
HTML & JavaScript, JQuery Objects
Note: Add them as TEXT objects as displayed above. Select “Contains HTML markup” check box.
Reset Button for Selection 1:
Reset Button for Selection 2:
JQuery Code: It has functions for Reset1 , Reset2, move & submit selections to combined hidden prompt