Altair® Panopticon

 

Script Actions

IMPORTANT: Script Actions, unlike URL and Navigation Actions, are only available when viewed through the Panopticon Visualization Server web client.

Script Actions are not available for use within the Panopticon Designer (Desktop) in Presentation Mode. They do appear in Presentation Mode for Panopticon Designer (Desktop) but will appear grayed out (disabled).

Script actions are created through the New Actions dialog window. They allow execution of defined JavaScript.

Adding Script Actions

  1. Right-click on a dashboard scope and then click New Action… in the context menu.

The New Action dialog is displayed.

  1. Select Script Action in the Type drop-down list.

The details of the script action are now displayed:

  1. Enter the Name of the script action.

  2. Select whether the action should apply to all or specific dashboards.

  3. Enter the parameterized script in the Script text box:

The parameters are written within curly brackets, {ParameterName}.

For script actions allowing multiple value input, you can optionally specify a value separator within the curly brackets where you put the parameter name.  The syntax is as follows:

{ParameterName:Separator}

For example: {Company:|}

Default separator is comma. At execution, the parameter will be replaced with real field values associated with the selected visualization node.

NOTE: The entered JavaScript should not include constructs that utilise curly brackets, as these are reserved for the processing of parameters. Additionally the entered JavaScript should not include single line comments

  1. Click the Add Parameter button to add parameters to the output script.

For each parameter, define a name and select the column from the source data table that will supply the contextual value.

The value of this selected column for rows under the selected visualization node will be passed as the parameter values to the target Script.

From version 5.9.2, the value separator is no longer specified with a drop-down selection. Instead, it is specified as part of the parameter name insertion into the URL.

  1. Check the Multiple Views box to pass multiple values for the parameter to the target script.

  2. If you selected an interactive parameter (i.e., $Interactive), the Input Validation and Error Message boxes are enabled.

Typically, interactive parameters are used to pass data back to data repositories or external systems.

When an action is executed which require an interactive parameter, an associated dialog box will be displayed.

For example:

    • Add a custom Input Validation. This can be any regular expression (e.g., “A-Z{3}”)

    • The parameter will not be updated unless it passes the validation. Enter an Error Message to help in defining a better input to match the regular expression (e.g., “Please use a 3-letter code.”)

  1. If you selected [Use Current Value], the current parameter value will be passed to the dashboard.

  2. You may also delete a parameter definition in the list by clicking  .

  3. Click OK to confirmation of the new script action.