Action Commands - Introduction

  • Updated

 

Relevant for All Commands

This chapter provides a reference description of each of the available Commands. Below is an example of a Command 'SELECT EXCEL' as it would appear in an Action Map.

Command Properties

Any Command such as the one defined above, have access to all of the information defined in the columns below. Not all Commands will use all of the below properties. This will be described below under each Command.

From

Name of the Input Data Source. Default = 'FROM'.

From values can be set directly inline, or can be set from the content of a variable by writing {=$MyVariableName} or combined variable and text by writing {=$MyVariableName}_SomeText (Requires Perfion 2022 R1 or later).

To

Name of the Output Data Source. Default = 'TO'.

To values can be set directly inline, or can be set from the content of a variable by writing {=$MyVariableName} or combined variable and text by writing {=$MyVariableName}_SomeText (Requires Perfion 2022 R1 or later).

Command Name of the Command to be executed.
Action Name of the Action to execute.
Only used by the command EXECUTE.ACTION and EXECUTE.ACTION.LOOP
Script Script code that may be executed by the Command. Not all commands use script.
Note You can use this to supporting information and to document your Actions

Command Maps & Parameters

Expanding the above 'SELECT.EXCEL' Command reveals a part of the Action Map, which is sub-ordinate to the Command, as seen below. This will also be referred to as the Command Map, as it is only relevant for the specific Command.

Parameters: Any mapping to a name prefixed with '@' will be considered as a parameter value for the Command. All parameter values can be set directly inline, or can be set from the content of a variable by writing {=$MyVariableName}.
Parameters for all commands (except the SET command):

@ExecuteActionOnErrorAndProceed Define an Error Handling Action to be executed if the command throwing an error. After the Error Handling Action is executed, the next step will proceed. The Error Handling Action is called with the Data Sources already created in the main action. (Introduced from Perfion2022 R1)
@ExecuteActionOnErrorAndStop Define an Error Handling Action to be executed if the command throwing an error. After the Error Handling Action is executed, the main action will end execution the next steps. The Error Handling Action is called with the Data Sources already created in the main action. (Introduced from Perfion2022 R1)
@ProceedOnError Proceed on errors. The From value must be "True" to enable the "Proceed on errors".

Parameters for all SELECT.* commands:

@Filter

Filter the result of the selected data. The filter can contain listed operators:
<, >, <=, >=, <>, =, IN, LIKE

Examples:

  • ItemName = '1923-16' or NOT ItemName = '1923-16'
  • DiameterCM < 8 or DiameterCM <= 8
  • ItemName IS NULL or ItemName IS NOT NULL
  • ItemName IN ('1923-16', '1923-18')
  • ItemName LIKE '1923' Wildcard characters are not allowed in the middle of a string. Eg. '1923*16' is not allowed.
  • ItemName = '1923*' AND DiameterCM < 8
  • ItemName = '1923-16' OR ItemName = '1923-18'

The Filter must be placed in the From column or as a script in the Script column. The From column has a limit at 255 characters.

Note: This parameter is only implemented on DataTable-output and ignored for XML-output.
Filters are introduced in Perfion 2022 R1

 

Remarks:
 
Filters follow three-valued logic (as defined in SQL and DataTables), meaning that comparisons involving NULL are neither true nor false. To account for this, NULL cases must be handled explicitly.
 
Instead of a simple <> comparison, the filter should be written as follows:
ItemName <> ExistingItemName
OR (ItemName IS NULL AND ExistingItemName IS NOT NULL)
OR (ItemName IS NOT NULL AND ExistingItemName IS NULL)
This ensures that rows where either value is NULL are correctly included in the result.
 
For further background on three-valued logic, see: https://en.wikipedia.org/wiki/Three-valued_logic#Application_in_SQL
@Order

Order the result of the selected data. The ordering can be ascending or descending and multi orders man be added.

Examples:

  • ItemName ASC
  • ItemName ASC, DiameterCM DESC

The Order must be placed in the From column or as a script in the Script column. The From column has a limit at 255 characters.

This parameter is only implemented on DataTable-output and ignored for e.g. XML-output.
Orders are introduced in Perfion 2022 R1

Value Mappings: Everything else will be considered as part of a value-mapping table. All mapping values can be set directly inline, or can be set from the content of a variable by writing {=$MyVariableName} or combined variable and text by writing {=$MyVariableName}_SomeText. Variables in mapping is introduced in Perfion 2022 R1.
Note: Do not assign a value to the Command column within a Command Map, it is not supported.

System variables from Remote Connections

The Remote Connection values can be used in the mapping and parameters with the syntax {=@$RemoteConnectionName} like the normal variables {=$MyVariableName}. The Remote Connection values can be used in C# script via SystemVar[“RemoteConnectionName“] like the normal variables var[”MyVariableName”]. (System variables from Remote Connections introduced from Perfion 2024 R1)

 

Find below all commands explained:

Was this article helpful?

0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.