Skip to main content

Narrow down with a data filter

"Artikel Cambira Austria" is to send item master data to the Austrian company, and only from two item groups: 100 Armaturen and 101 Ersatzteile. The data filter records that; in the end, 1,186 of the 2,418 items are in it.

The data filter decides which records the route knows at all. The screen says so too: the section carries the addition "for full and incremental runs" in its header. A full run therefore reads the entire data set within the filter. Which part of it a run touches is decided by the run type — see Triggering.

What you need​

  • The Routes permission at the Full level — see Permissions.
  • A route whose source has a fetch endpoint and whose field structure is resolved. To count, the filter needs the fetch endpoint; without it, the filter can only be created, and the field picker shows "Enter the fetch endpoint."
  • Entry point: Configuration → Routes, select the route, Source data tab.

Xchange saves every entry automatically. In operation, it takes effect only with the activated configuration snapshot — that is step 4.

1. Create the first condition​

The Data filter section is collapsible and sits on the Source data tab, above the change filter.

  1. Expand the Data filter section.
  2. If the section is still empty: choose Add group in the section header.
  3. In the group, choose Add condition. The row has three columns for you to fill: Field, Operator, Value.
  4. Choose ItemsGroupCode, the item group, as the field. The picker lists the source's fields under Own fields.
  5. Choose equals as the operator.
  6. Enter 100, the item group Armaturen, as the value.

A filter condition on the item group 100, Armaturen.

Which other operators exist is listed in Routes — Source data. For this example, one is enough.

2. Add the second item group​

What is needed is 100 and 101, so a second condition — and an item is in only one of the two item groups. What you are looking for is therefore "either of the two".

  1. In the same group, choose Add condition again.
  2. Fill the same row again, this time with the value 101.
  3. In the group header, set the combination to OR.

The filter now covers every item that is in either of the two item groups. With AND, an item would have to be in both item groups at once — and the filter would stay empty.

If several groups sit one below the other, a second combination appears between them: How the groups are combined. It is present only from the second group onward; for this example, one group with two conditions is enough.

3. Count matches​

Before you activate, check how large the selection has become.

  1. In the section header, choose Count matches.
  2. Xchange queries the source with exactly these conditions and writes the number next to it.

For "Artikel Cambira Austria", it shows 1,186 records. That is the scope of a full run of this route — and the set in which an incremental run looks for changes.

The data filter reports 1,186 records.

If a message appears instead of the number, it says what the cause is — the missing fetch endpoint, or a condition that cannot be evaluated against this source. In that case, only the message is shown.

4. Validate and activate​

Your changes are in the draft. Validate it and activate it — only then does the route run with the new filter. The way there is described in Validate and activate.

What stays in the target system​

A record that drops out of the filter stays in the target system: it was transferred before the filter excluded it.

The case from the item master: ERS-2087, "Dichtungssatz Nordfluss", was in the item group 101 Ersatzteile and was moved to the item group 104 Auslaufartikel. It thereby drops out of the data filter — the next incremental run passes over it, and in the Austrian company it would remain unchanged.

Such a departure is reported by a run with Cleanup switched on: after the run, it reports to the target system every record that the route transferred earlier and that has dropped out of the data filter. The whole way there — both settings, the checkbox and how Xchange recognizes a departure — is covered by Transfer deletions or deliberately leave records in place.

Whether anything is reported at all is decided by the route's Delete behavior on the Behavior tab: Do nothing stays silent, Deactivate in the target system reports the departure. What the target system then does, it sets up itself — Xchange reports, the target system sets the record inactive. For "Artikel Cambira Austria", the field is set to Deactivate in the target system, and the Austrian company then set ERS-2087 inactive; the record itself remains there. Both settings in detail: Routes — Behavior.

See also​