Other prompt types
In addition to dashboard prompts, you can these types of prompts:
- Toolbar Prompts
- Date Prompts
- List Prompts
Create a toolbar prompt
Procedure
Open a dashboard which contains at least one parameterized report.
Click the Edit Content icon to open the editing options in the dashboard.
In the bottom section, inside the Objects pane, choose Prompts to access the Prompt pane.
Click Show Prompt Toolbar to display the prompt toolbar to dashboard users.
Click Add to add a prompt.
The Prompt dialog box appears.In the Name field, enter the title for the prompt toolbar.
In the Control box, click the format for the prompt options.
For example, you can choose the drop-down control if you want a list which appears when users click the first option.Ensure that Static List is selected under Type.
Customize toolbar prompts
Procedure
In the Data box, click Add.
The List Value dialog box appears.In the Label field, enter the option name as you want it to appear to dashboard users.
In the Value field, enter the parameter source name.
If using the Steel Wheels sample, enter Classic Cars.Add labels and values for each parameter you want to filter. Click Close to exit the List Value dialog box.
If you are filtering an Analyzer report and using a static list, you can add the option All. This option drops the filter from the report and shows all values.In the Control Properties box, under Initially Selected, choose which item you want to appear first in the prompt list.
Choose Use First Value to set the default to the first value in the list, or you can choose Specify if you want a specific value to appear first.Click OK.
In the Objects pane, choose the title of the report you want to filter. Click the Parameters tab and choose the correct Source for the parameter from the list.
The source should be the name of your prompt.Click Save.
Creating a date prompt
The date picker prompt allows users to select values based on calendar dates. When creating a date picker prompt, you will need to set a date format which the user will select using the date picker prompt. By default, the format used is yyyy-MM-dd.
The date picker prompt uses Dojo date formats. In the past, this component was based on the JQuery Date Picker, and to support legacy formats, the old formats will be converted automatically.
Not all formats are supported or make sense when a date is selected. For instance, anything with less granularity than a unit of 'day' will default to the Dojo format, so we encourage you to use any format from 'd' to 'y' which is currently supported by the date picker control type. You can use any desired configuration where 'yyyy-MM-dd', 'yy-M-d' or 'd/MM/yyyy' is a valid format.
As a result the pattern can be any combinations of the following patterns of years, quarters, months and days:
Pattern | Description | Example Date: Monday, January 4, 2016 |
G | era | AD |
y or yy | year (two digit) | 16 |
yyy or yyyy | year (four digit) | 2016 |
q or Q | quarter (one digit) | 1 |
M | month numeric (no leading zero) | 1 |
MM | month numeric (two digit) | 01 |
MMM | month name short | Jan |
MMMM | month name long | January |
d | day of month (no leading zero) | 4 |
dd | day of month (two digit) | 04 |
D | day of the year | 4 |
E | day of the week | 2 |
Create a list prompt
Procedure
In the dashboard page, under General Settings, select Prompts.
The Prompt Editor appears on the right. No prompts are listed if this is the first time you are assigning prompts.To display a prompt toolbar to users of the dashboard, enable Show Prompt Toolbar.
A placeholder for the prompt toolbar appears at the top of the dashboard.Click the Add icon to add a prompt.
The Prompts dialog box appears.In the Prompts dialog box, enter a Name for your prompt.
Under Data Type, choose Metadata List.
Click Select to choose the data source which contains the content you need to set options from the drop-down list and click OK.
The Query Editor opens.In the Query Editor, build a query to choose either a single column (which represents both a name and a value), or two columns representing the display names and corresponding values.
If a single column query is defined, the values of that column will be used for both the display names and the values.Click OK to exit the Query Editor.
Your options appear under Selected Items in the Prompts dialog box.Under Control Properties, enter a default Label and Value for the initially selected option in your prompt control.
Select a Label to display in the prompt control.
This is the user-friendly name which users will see in the dashboard.Select the Value.
This is the value in the database which is associated with the label you selected in the previous step.If applicable, choose your Display type from the list.
Some prompt controls allow you to choose the position of your prompt options. If you have a long list of options, such as a list of cities, options may not appear correctly in the user console unless you change the Display type to Horizontal.Click OK.
Results
Create a cascading list prompt
This task uses the example of creating a
country-city cascade prompt.
Procedure
For Type, select Metadata List to create the drop-down prompt Country.
For Type, select SQL List which includes a parameter, ${selected_country}, in its associated query for the check box prompt City.
Set the Default Value for the selected_country parameter to USA with New York City (NYC) as the initially selected value for the check box prompt.
Results
Using this example, the report designer can now add a data table, chart, or other content in the dashboard which can be driven by the prompt he or she just created. If the designer adds a pie chart to the dashboard, the pie chart will display the percentage of sales per city. In the Query Editor, the report designer creates a parameter, {City}, with an extended default value: NYC|Las Vegas. The resulting pie chart displays values for New York City and Las Vegas. Under the Parameters tab associated with the pie chart, the Source value for the City parameter is changed to the City prompt.
When the report is saved, users of the dashboard can see results for a country and multiple cities in that country.