Define Import Structure Specifications - the Filters Tab

You can use this tab to define any filters to determine which rows in the text file should be included or ignored based on a given criterion.

If the import specification contains more than one filter, all filters have to be satisfied for a row to be imported from the file. For example, you can define on which row the loading process should begin or end. You can also state that a certain row number must be loaded and that rows or fields that contain or do not contain a certain value must be loaded.

Before you begin

When you define conditions you can use different types of wildcards to represent one or several characters. The table shows wildcards you can use and what type of characters they match or skip.

Note: All conditions with regular expressions are case sensitive.
Table 1. Wildcards that you can use when defining conditions
Wildcard character Description Example:

None

 

ab - Matches abc, Xab

.

Any single character

a.a - Matches aaa, a3a, aBa

.*

Several characters

a.*a - Matches aa, aBa, aBBBa

\*

Special characters

A\*a - Matches a*a

^

Starting with

^ab - Matches any string starting with ab

$

Ending with

ab$ - Matches any string ending with ab

[0-9]

Single digit

a[0-9]a - Matches a0a, a9a

[a-z]

Within an interval

[a-z] - Matches f, p, j

[^a-z]

Outside an interval

[^a-z] - Matches 9, &, %

[^0-9]

Except digits

[^0-9] - Matches A, a, &

a[^b-m][0-9]

A combination

a[^b-m][0-9] - Matches aN9, az0, a99

Procedure

  1. On the Transfer menu, click External Structures/Define Import Structure Specification. The Define Import Structure Specification window opens.
  2. In the Specification list box, select the specification you want to change, or click the New button and enter a new name and press Enter.
  3. On the Filters tab, click the New Filter button to add a new filter. In the dialog box that opens, enter the name of the new filter and click OK.

    The new filter is displayed in the list box. Alternatively you can select a filter from the list box.

  4. From the Filter Type option group, select the relevant filter type.
  5. From the Subfilter option group, select the type of criteria to be used for a specific filter.
  6. From the Filter Value option group, select the relevant option to use for testing; Value, Blank, Zero, Blank or Zero. If you select the Value option, enter the value you want to test for. Here you find examples of regular expressions you can use.
  7. Select the Regular Expression option if the entered value is an expression.
  8. Click Save and open the Operation Templates tab.

Results

  • If several filters are defined, all filter criteria must be passed for a row to be imported.
  • Defined variables are not affected by filters. The filters only apply to fields that are loaded from each row in the import file.