XenoGuard 4.0 Documentation

Parameter-List Filter

ActionStep Reference » Programming » Parameter List » Parameter-List Filter 

The Filter ActionStep narrows down the content of a parameter list based on specified criteria, including the column, operator, and value.


[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Parameter List node, select the Filter ActionStep.

Parameters:

The ActionStep has the following input parameters:


name Description
List Reference
The source list to filter the data from.

Allowed Context Scope [Action]
Allowed Values [Parameters, Result List]
Filters
The set criteria for filtering the content.

The parameters for the "Filter" sub-branch:

  • Column - the heading column name
  • Operator - includes ==, !=, >, >=, <. <=, LIKE, REGEXP
  • Value - the value to be compared with
Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types
 [Variable, Parameter, Enum]

Examples of how you can use the REGEXP as Operator in your ActionScript:

Description Example
Search for a word at the beginning of a line ^word
Search for a word at the end of a line word$
Search for a text at any position
word
Check if the text contains a phone number \d
Search for hexadecimal string .+?(?=00)
Search for binary string ^[0-1]*$

Operator Descriptions in the Filters sub-branch:

Operator Description
LIKE Search for a text or a word in a line.
== Search for a text that is equal to the target value.
!= Search for a text that is not equal to the target value.
< Check if the number is less than the target number value.
> Check if the number is greater than the target number value.
<= Check if the number is less than or equal to the target number value.
>= Check if the number is greater than or equal to the target number value.

Results:

The ActionStep returns the following results:


name
description
Result
The refined content from a parameter list based on the specified filter criteria.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types
 [Variable, Parameter]

Example 1 (Filter and store a dictionary list as text file):

In this example, a list named Car Parts is created to display the inventory of items on hand. This list is then filtered to show only items with the status Low stock. The resulting filtered list is subsequently saved as a text file in local storage. After the file is saved, a notification is displayed in a Message Box.

Example 2 (Search files from a directory with the Like operator):

In this example, a local variable named Result Count is created with Number as its data type. Files from a directory in local storage are then retrieved. These files are iterated through and filtered using the Like operator. The number of files that match the filter criteria is assigned to the Result Count variable using the Set Identifier ActionStep. Finally, the count of matched files is displayed using the Write Text ActionStep.

Example 3 (Search a folder for files without extension filename):

In this example, a local variable named ResultCount with Number as its data type is created. Files are then retrieved from the Windows\System32 directory. This list of files is iterated over and filtered to find files without an extension, using a regular expression. The count of files that match this expression is then assigned to the ResultCount variable using the Set Identifier  ActionStep. Finally, the resulting count is displayed using the Write Text ActionStep.


See other Parameter List operations:

Get Row
Save
Sort