XenoGuard Documentation

Filter

Actions » Programming » Parameter List » Filter 

The action Filter refines the content of a parameter list according to set column, operator, and value.


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

Parameters:

The action 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 action script:

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 action 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):

This example creates a list named Car Parts that shows items on hand. The list is then filtered by displaying only the items with the value of "Low stock". As a result, the filtered list is then stored as a text file in the local storage. A notice is then displayed via Message Box.

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

This example creates a local variable Result Count with Number as data type. Files from a local storage directory are then retrieved, iterated, and filtered using the "Like" operator. The number of matched files was passed to the value of the variable with Set Identifier and the count was displayed via Write Text.

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

This example creates a local variable ResultCount with Number as data type. Files from a Windows\System32 directory are then retrieved. The list is then iterated and filtered to search for files without an extension filename using a regular expression. The number of files that matched the expression was passed to the variable with Set Identifier and the resulting count was displayed via Write Text


See other parameter list operations:

Get Row
Save
Sort