Using dashboard variables in attachments
The value of all fields in the Attach to Apama dialog, other than Attach to and For, can be set to dashboard substitution variables. This allows you to dynamically configure an attachment when a dashboard is displayed. For example you could set the Display variables field to the substitution variable $displayVariables (where $displayVariables value equals a semicolon separated list of scenario variables).
To create a substitution variable
1. Select Tools | Variables to display the Variables panel (if the panel is not showing).
2. In the Name field enter a name that starts with "$". Names of substitution variables start with "$" by convention. Names of variables that are not substitution variables (see below) do not start with "$".
3. In the Initial Value, optionally supply an initial value.
4. Check the Use as substitution checkbox.
5. In the Data Type field, ensure that this set to Scalar, the default.
The Initial Value field allows static specification of substitution values at development time. You can also allow dashboard users to set the value of a given substitution at runtime by attaching the varToSet property of a control object (such as a text field) to the given substitution.
Dashboard Builder provides a number of predefined substitutions—see
About
drilldown and $instanceId and
About other predefined substitution variables.
Dashboard variables in attachments only take effect when the dashboard is displayed. Subsequent changes to the variable will not change the attachment unless the dashboard is redisplayed.