This action executes filter rules on the input data source. As a result, the action extracts fields from input data and maps their values to the linked variables.
Use data filter action executes the selected filter and assigns the variables with respective values.
-
Elements on lower level: The action can create sub-level elements, identified with "for each line" or "for each data block in ...". When you see those, the filter will extract the data not on the document level (with hard-coded field placement), but relatively from the sub areas that contain repeatable sections. In this case make sure that you position your actions below such elements. You have to nest the action under such elements.
-
Mapping variables to fields: The mapping between trigger variables and filter fields is defined either manually, or is automated, dependent on how the filter is configured. If you have manually defined fields in the filter, you also have to manually map fields to the corresponding variable.
Note It's a good practice to define fields using the same names as are names of the label variables. In this case the button Auto map maps matching names automatically.
-
Testing the execution of filter: When the mapping of variables to fields is done, you can test the execution of the filter. The result will be shown on-screen in table. Number of lines in the table represent the number times actions will execute in the selected level. The column names represent the variable names. The cells contain values as assigned to the respective variable by the filter. The default preview file name is inherited from the filter definition, you can execute filter on any other file.
-
Collect records for reports collects your data so you use data filters to create reports. For more information Automating Reports.
-
Filter selection.
-
Data your filter uses to execute rules.
-
Report records collection.
-
Mapping your fields (from filter) to variables (from label/trigger).
-
Filter execution preview.
For more information, see sections Understanding Filters and section Examples in Loftware Automation user guide.
Filter group allows you to select which filter should be used.
-
Name: specifies the name of the filter you want to apply. It can either be hard-coded or dynamically defined using an existing or a newly created variable. The list contains all filters defined in the current configuration. You can use the bottom three items in the list to create a new filter.
Note | |
---|---|
Selecting another filter removes all actions which are nested under this action. If you want to keep the currently defined actions, move them outside of the Use Data Filter action. If actions are accidentally lost, Undo your action and revert to the previous configuration. |
Data Source group allows you to define the contents you want to send to the printer.
-
Use data received by the trigger: selects the trigger-received data to be used in a filter. In this case, the action uses the original data received by the trigger and execute the filter rules upon it.
Example 59. Example
If you use a file trigger, the data represents content of the monitored file. If you use a database trigger, the data is a data set returned from the database. If you use a TCP/IP trigger, the data is raw content received via socket.
-
File name: defines path and file name of the file which contains the data upon which the filter rules will be executed. The content of the specified file is used in a filter. The option Data source enables the variable file name. You must select or create a variable that contains the path and/or file name.
-
Custom: defines custom content to be parsed by the filter. You may use fixed content, mix of fixed and variable content, or variable content alone. To insert variable content, click the button with arrow to the right of data area and insert a variable from the list. For more information, see section Using Compound Values in Loftware Automation User Guide.
Data Preview field provides an overview of the filter execution process after the content of the previewed file name is read and the selected filter is applied to it.
The rules in the filter extract fields. The table displays the result of the extraction. Each line in the table represents data for a single label. Each column represents a variable.
To be able to observe result, configure the mapping of fields with matching variables. Depending on the filter definition, you could map the variables to fields manually, or have it done automatically.
-
Preview file name: specifies the file that contains the data that is going to be parsed through the filter. The preview file is copied from the filter definition. If you change the preview file name, the new file name is saved.
-
Open: selects another file upon which you want to execute filter rules.
-
Refresh: re-runs filter rules upon the contents of the preview file name. The Data Preview field gets updated with the result.