docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  Implementing InterSystems IRIS Business Intelligence  /  Defining Custom Actions

Implementing InterSystems IRIS Business Intelligence
Executing Client-Side Commands
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Executing Client-Side Commands
An action can contain commands to execute when the control returns to the dashboard. To include such commands, set the pContext.command property within the definition of the action. For example:
        //this part defines Action 1
        //perform server-side actions
        //on returning, refresh the widget that is using this KPI 
        Set pContext.command="refresh;"
For pContext.command, specify a string of the following form to execute a single command:
command1
For pContext.command, specify a semicolon-delimited list of commands:
command1;command2;command3;...;
The final semicolon is optional.
Some commands accept one or more arguments. For these, use command:arg1:arg2:... instead of command.
Available Commands
Within pContext.command, you can use the following commands:
alert
alert:message
Displays the message in a dialog box. message is the message to display
For example:
 Set pContext.command = "alert:hello world!"
applyFilter
applyFilter:target:filterSpec
For information on the arguments, see “Details for applyFilter and setFilter.”
This command sets the given filter and refreshes the browser window.
For example, the following applies a filter to a pivot table:
 Set pContext.command = "applyFilter:samplepivot:[DateOfSale].[Actual].[YearSold]:&[2008]"
navigate
navigate:url
Where url is the URL to display.
This command opens the given URL in the same browser window.
For example:
 Set pContext.command = "navigate:http://www.google.com"
newWindow
newWindow:url
Where url is the URL to display.
This command opens the given URL in a new browser window.
For example:
 Set pContext.command = "newWindow:http://www.google.com"
popup
popup:popupurl
Where popupurl is the relative URL of a popup window.
This command displays the given popup window. For example:
 Set pContext.command = "popup:%ZEN.Dialog.fileSelect.cls"
refresh
refresh:widgetname
Where widgetname is the optional name of a widget to refresh; if you omit this argument, the command refreshes the widget from which the user launched the action.
This refreshes the browser window, using any current settings for filters.
For example:
 // Refresh the widget that fired this action and another named samplepivot.
 Set pContext.command = "refresh;refresh:samplepivot"
Note that this example includes multiple commands, separated by a semicolon.
setFilter
setFilter:target:filterSpec
For information on the arguments, see “Details for applyFilter and setFilter.”
This command sets the given filter, but does not refresh the browser window.
Details for applyFilter and setFilter
The applyFilter and setFilter commands are as follows, respectively:
applyFilter:target:filterSpec
And:
setFilter:target:filterSpec
Where:


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-09-19 05:42:26