Defining and Applying Filters to Source Data
You can use EZscript to define data filters to filter non-hierarchal source data that contain only one record type. The EZscript expression specifies which source data a map transforms. For example, you can transform only records where the state code is “TX”.
When you execute the map, the filter operation occurs immediately after a source record is read. Each record is evaluated. If a record meets the filter criteria (in this case, the state code IS “TX”) the record is processed. If a record does not meet the filter criteria, it's discarded.
To define and apply a filter:
1. In the map file, go to the Sources tab > Define Filters section.
2. Click
to add a data filter.
The EZscript Expressions window is displayed, where you can define a filter by adding an expression. For example, Records("R1").Fields("State") == "LA"
3. After adding the data filter, it appears in the Define Filters section.
4. From the Apply Filters to drop-down list, select one of the following options:
• All records - Applies the filter to all the records in the source.
• N records - Applies the filter to a specified set of records in the source. When you select this option, where N Equals appears. Type a value. The maximum value is 2147483647.
5. You can also do the following:
• To edit a data filter, click the filter and then click
.
The EZscript Expressions window is displayed where you can modify the expression.
• To delete a data filter, click the filter and then click
. A message appears asking for confirmation. Click
Yes. The filter is removed from the
Define Filters section.
• To move the order of the data filters:
– Click
to move the data filter up.
– Click
to move the data filter down.
6. Click Save to save the changes.
Last modified date: 12/03/2024