Introduction
Introduction
You define custom actions within KPI classes. Then:
-
When you display a given KPI in a widget, you can add controls to that widget that invoke the custom actions. See Adding Widget Controls.
-
If you specify a KPI class as the actionClass attribute of the <cube> element, all actions within this class are available to pivot tables that use this cube, which means they can be added as controls to widgets that display these pivot tables.
-
If you specify a KPI class as the actionClass attribute of another <kpi> element, all actions within this class are available to that KPI, in addition to any actions defined within that KPI.
-
You can execute actions from within the Analyzer. Note that in this case, only a subset of the client-side commands are supported: alert, navigate, and newWindow. Other commands are ignored.
For details on defining KPIs, see Advanced Modeling for InterSystems Business Intelligence.
You can perform many of the same operations with either a standard action or a custom action:
Operation | Available As Standard Action? | Can Be Performed in Custom Action? |
---|---|---|
Setting a filter | Yes | Yes |
Setting a filter and refreshing the display | Yes | Yes |
Refreshing the display of a widget | Yes | Yes |
Refreshing the display of the entire dashboard | Yes | No |
Specifying the row or column sort for a pivot table | Yes | No |
Specifying the row or column count for a pivot table | Yes | No |
Displaying a listing for a pivot table | Yes | No |
Displaying another dashboard | Yes | Yes |
Displaying a URL in the same page | Yes | Yes |
Displaying a URL in a new page | No | Yes |
Executing code on the server | No | Yes |
Changing the data source of the widget | Yes | No |
Changing the row or column specification of the widget | Yes | No |
For details on the standard actions, see Adding Widget Controls.
Context Information
The system makes context information available to actions, by two different mechanisms. When a user launches a custom action, the system writes context information into the pContext variable, which is available in your custom code on the server. When a custom action opens a URL, the system replaces the $$$VALUELIST and $$$CURRVALUE tokens, if these are included in the URL. The following figure illustrates these mechanisms:
