URL Parameter
Description
This parameter control uses URL parameters in the address bar in the “Filter” field in the properties
This is best used as a hidden control (not appearing on the control panel on the Dashboard Viewer) and should be always on. If set to be displayed on the control panel, it can also be used to for diagnostic purposes.
An example of such usage will be where the dashboard is embedded inside a form and the user selects certain region(s) to view. The URL Parameter filter can then be used to display the selected region(s) based on the different selection in the form.
Viewer Usage
Upon landing in the Dashboard Viewer, the view will display the data records or no records as per defined by the value of the “Default Select” field in the filter.
When the parameters are added onto the end of the URL in the Dashboard Viewer, the view will display the records as defined in parameter. There are no option to select in the filter. It should be used as a hidden control.
Specific Properties
Below are the fields that are specific to this filter control:
Field | Description | Mandatory | Input Type | Constraints | Default Value |
---|---|---|---|---|---|
Parameter Name | Parameter defined in dataset aggregation pipeline. | Y | Textbox | Align with the parameter in aggregation pipeline of dataset | Empty |
Filter | Selects the field to control from the dataset. | Y | Drop-down list | Select from drop-down list | Empty |
Default Select | Defines whether to display all or no data initially in the Dashboard Viewer. Available options: - All - None |
Y | Drop-down list | Select from drop-down list | “All” |
For example on how to use aggregation pipeline, refer to Aggregation Pipeline in Dynamic Parameter.
Example
This example uses a linear table that displays records of car information and a URL Parameter filter that filters the region(s) of these records.
In the URL Parameter filter, select the desired dataset and field to filter in their respective fields. If it is desired to display all records, select “All” in the “Default Select” field. Selecting “None” in this field will display an empty table. In this example, select “None”. Rename the filter to a desired name. In this case, “Demo” is used.
For diagnostic purpose, select “Always” in the “Visibility” field. This will shows the selection in the Control Panel.
In the properties of the Linear table, select “Demo” in the “Controlled By” field.
Save the changes. The linear table should display empty.
In the address bar, key in ?Demo=Midwest
at the end of the URL and hit the “Enter” key. The linear table now display the records in the “Midwest” region. The URL Parameter filter in the Control Panel shows the value used in the URL.
Multiple values can be used in the URL using the &
operator. Try ?Demo=Midwest&Demo=South
and the table display records from “Midwest” and “South”. The values are ORed together.
If the value used in the parameter is incorrect, no records will match and so no rows will be displayed.
Do note that the URL parameters are strings, therefore the matching is based on string. This will not match integers or booleans.