Create Parameters
- 3 minutes to read
This topic explains how to create a new dashboard parameter and specify its settings.
To create a dashboard parameter in the Web Dashboard, perform the following steps.
- Invoke the dashboard menu and select Parameters.
In the Parameter List, click the Add New Parameter button. The following settings are available for the created parameter.
Specify the following parameter’s settings.
UI Settings
Description
API
Name
Specifies the parameter name.
When creating and modifying parameter names, follow the rules below:
- A name can contain letters, numbers and underscores.
- A name cannot contain spaces.
- A name cannot be an empty string.
- The dashboard cannot contain parameters with the same name.
- Names are case-sensitive. For example, you can create the names Parameter and PARAMETER.
Description
Specifies the parameter’s description displayed to an end-user.
The parameter’s description is the value displayed in the Parameter Name column of the Dashboard Parameters dialog.
Visible
Specifies whether the parameter is visible in the Dashboard Parameters dialog.
Allow Null
Specifies whether a null value can be passed as a parameter value.
Allow Multiselect
Specifies whether multi-selection is enabled for the current parameter.
The following limitations are applied to parameters with multi-selection enabled:
- Use the is any of or is none of operators to pass a multi-select parameter to a filter criteria or to the Expression format condition.
- Use the In or Not In operators to pass a multi-select parameter to a calculated field expression.
- Custom SQL queries do not support multi-select parameters.
- Stored procedures used in SQL and Entity Framework data sources do not support multi-select parameters.
Select All Values
Note that this option is in effect when Allow Multiselect is set to true.
Specifies whether all parameter values should be selected in the initial state of the Dashboard Viewer.
Type
Specifies the parameter type.
Default Value
Specifies the default parameter’s value.
Look-Up Settings
Specifies the parameter’s look-up editor settings. To learn more, see the next step.
Depending on the selected Look-up Settings option, you need to specify the following settings.
Look-up Settings
Description
API
No Look-Up
An end-user specifies the required parameter value in the Dashboard Parameters dialog.
None
Static List
An end-user selects a parameter value from a static list. To add predefined parameter values, use the + button.
Dynamic List
An end-user selects a parameter value defined in a data source. To provide access to data source values, specify the following options:
- Select the required Data Source from the list of available data sources. For SQL or Entity Framework data sources, select the required Data Member that specifies the query/data member from the selected Data Source.
- Specify data members for the dashboard parameter’s value and display name using Value Member and Display Member, respectively.
- If necessary, specify the data member used to sort parameter values using the Sort By option. The Sort Order specifies the required sort order.
To specify the parameter’s value at runtime, handle the ASPxDashboard.SetInitialDashboardState event. The value is displayed in the Dashboard Parameters dialog and can be changed by an end-user. To change the parameter value before it is passed to a data query, or to validate the user value and modify it, handle the ASPxDashboard.CustomParameters event.