Create parameters that you can use in all of your widgets with an AQL or Generic API data
source, such as Time Period and Time Value. Using common
parameters and default values can reduce the time that it takes to create or edit individual queries
for your widgets.
Before you begin
Parameters appear within curly braces, as in the following AQL example:
Because curly braces are also used in an AQL statement within a quoted string (a string literal
between quotation marks), you must use a backward slash (\) as an escape character before the
opening curly brace within a quoted string. This syntax ensures that the quoted string is not
interpreted as a parameter and cause incorrect query results. If you have a backward slash in a
quoted string, add an extra backward slash as the escape character.
Procedure
-
From a dashboard that contains AQL-based or Generic API-based widgets, such as the Cases dashboard, click the dashboard menu ().
The window
displays the parameters that are already created in your workspace. If any of the parameters have
default values, they're listed in the Value column.
-
To set a default value for a parameter, click
the Edit icon, select a value from the Default value
list, and then click Save.
Notes:
- This action sets the default value for every widget that uses the parameter, and the
Parameters card automatically updates. Alternatively, you can add a value for
the parameter in specific widgets.
- When you change the default value for a
parameter, you're changing the value everywhere the parameter is used in your workspace, except in
expanded dashboards and widgets. If you don't set the value as the default value, the updated
change applies only to the current session. However, if you set the value as the default, the
current session value also uses that value.
- The predefined SYSTEM:accountId parameter returns the
account ID of the user who is logged in. This parameteri read only and you cannot change the
default value.
- The predefined SYSTEM:timerange parameter represents the time selector
value.
- To add a parameter to your workspace, click Add new
parameter.
- Select the parameter type and give the parameter a name and label. Use the label to
provide more details or suggest a use case for the parameter.
- Add a value and a description for the parameter.
- Click Save.
- Click Close to return to the main view and continue your
work.