Adding Parameters
Parameters can be added to a query to allow for different values to be used when the query is run (for export) and when being added to a dashboard. Parameter are also used to link queries for advanced drilldown.
Once created and defined, parameters are added to the WHERE or HAVING clauses for record selection. Parameters can be defined with an initial value which can be easily changed when added to a dashboard.
Steps
-
Once in the Query Editor (see Creating a New Query for information) press the Parameters button .
The Parameters panel opens on the right.
-
Press the Add button to define a new parameter.
-
Fill in the following to define the parameter:
Name - Give the parameter a name. This name is used internally and only alphanumeric characters (a-z, A-Z, 0-9)—not including punctuation or symbols—are allowed. Spaces are not allowed (an underscore _ is a good substitute).
Display Name - This is the name seen by the user. It can be a single word, or as above, a phrase or command to instruct or ask the user for input.
Parameter Type - Use the drop-down to select one of the available types:
Number - Use this type for numeric values.
Min Value : (optional) Specify a lower limit if you want to restrict choices to a range of numbers.
Max Value : (optional) Specify an upper limit if you want to restrict choices to a range of numbers.
String - Use this type for character data.
Length - Specify the maximum length of the parameter value.
Valueset - Use this type to provide a (user) defined list of parameter values.
Value Type: Use the drop-down to select the type of data for the parameter. Only three types are valid: Number, String, and Date.
Multiple: Set to allow for multiple selections.
Select All: Set to all for selection of all available values.
Add Button : Press the Add (values) button to enter a value for the list presented to the user. Press Save. Repeat for each value needed.
Dblist - This type allows a column from a file to provide a list of parameter values.
Column: Choose a column from which to select a value for the parameter. Use the Lookup button to choose a column name.
Multiple: Set to allow for multiple selections.
Date - Use this type for date values.
Start: (optional) Use the Calendar button to specify a lower limit if you want to restrict choices to a range of dates.
End: (optional) Use the Calendar button to specify an upper limit if you want to restrict choices to a range of dates.
Decimal - Use this type for numbers with decimals.
Min Value : (optional) Specify a lower limit if you want to restrict choices to a range of numbers.
Max Value : (optional) Specify an upper limit if you want to restrict choices to a range of numbers.
Default Value - Specify an initial value for use by the parameter. Make sure the value conforms to the selected Parameter Type.
- Press the OK button to save the parameter definition and return to the Parameters panel.
- Press the Add button to create another parameter, or press Cancel to return to the query editor display.