Apama 10.7.2 | Building and Using Apama Dashboards | Building Dashboard Clients | Attaching Dashboards to Correlator Data | Creating a data attachment | About drilldown and $instanceId
 
About drilldown and $instanceId
When you create a dashboard with Dashboard Builder, you will frequently need to pass context information that identifies a DataView item to display or operate on. Consider, for example, a dashboard with a table containing one row for each instance of a given instance. In order to display detailed information about an instance when the end user selects its corresponding row in the table, you need to pass the identity of the selected instance to the visualization objects that will display the details.
You can pass such information from one object to another by doing both the following:
*Specify that a substitution variable be set to a specified value in response to a specified end-user action on one object.
*Use that substitution variable in the data attachment for the other object.
In many cases you can simplify this procedure by using the predefined substitution variable $instanceId. This variable is automatically set to the value of apama.instanceId for the table row that is currently selected. If multiple rows are selected, $instanceId is set to multiple values.
For more information and examples, see Performing drilldowns on tables and Specifying drill-down column substitutions.
Note:
In cases where the end user can select rows of multiple tables at once, you must use user-defined variables instead of $instanceId to pass the required information. If rows from multiple tables are selected, $instanceId is set according to only one of the tables.
You will find yourself using $instanceId frequently in attachment filters and instance operations. You will see many uses of $instanceId in subsequent sections of this guide.