Rules-Editor
Hinweis: Weitere Informationen zu den regulären Ausdrücken finden Sie auch unter
Reguläre Ausdrücke.
The rules-editor allows complex manipulation of data to be replicated, even with multiple assigned fields.
The Field Mapping column shows the mapping as it was set up in the setup wizard. If you expand an LDAP database field (Target), you will see the source fields (Source) assigned to it.
An LDAP database field can be expanded and modified using the edit button.
The assigned source fields can be expanded and modified directly in the list.
The rules are always evaluated from the inside out, which means that the rules are first applied to the source fields and then to the database field with the resulting data.
The result of applying the rule can be checked directly in the result column for both the database field and the source field.
Prefix:
The prefix is inserted before the field value.
Suffix:
The suffix is appended to the field value.
Regular expression:
Action:
Auszuführende Aktionen mit regulärem Ausdruck:
- Suchen und Ersetzen: Durch Eingabe eines regulären Ausdrucks in Suchen und verwenden von Ersetzen kann der Zielwert manipuliert werden.
- Kein Treffer: Feldinhalt löschen: Kein Treffer im Feldinhalt zum regulären Ausdruck, so wird der Feldinhalt wird gelöscht.
- Kein Treffer: Datensatz auslassen: Kein Treffer im Feldinhalt zum regulären Ausdruck, so wird der Datensatz wird nicht repliziert.
- Kein Treffer: Datensatz löschen: Kein Treffer im Feldinhalt zum regulären Ausdruck, so wird der Datensatz wird aus der MetaDirectory Datenbank gelöscht.
- Erstes, nicht leeres Feld verwenden: Bei Zuordnung von mehreren Quellfelden wird nur das erste Feld mit Inhalt verwendet. Nur bei LDAP-Datenbankfeldern vorhanden!
Die Icons neben dem Namen der Zuordnung zeigen den Auswertungstatus des regulären Ausdrucks:
- regular expression syntactically correct, matching test-pattern
- regular expression syntactically correct
- Replacement text exists, search expression is missing
- incorrect regular expression syntx
Example of use:
Eine zu importierende Datenbank enthält ein Feld namens
deleted welches angibt ob der Datensatz in der Quelle bereits gelöscht wurde. Ist der Wert des Feldes "Y", so soll der Datensatz nicht mehr repliziert werden:
- Search: \b\S*[^Y]\S*\b
- Action: Kein Treffer: Datensatz auslassen bzw. Bei Treffer Datensatz löschen.
Beim Importieren einer Datenbank sollen zur Datenbereinigung nur URLs importiert werden wenn diese mit http oder www beginnen, sonst soll das Feld leer bleiben.
- Suchen: \b(www|http)
- Action: Kein Treffer: Feldinhalt löschen
Eine zu importierende Datenbank enthält die Felder BusinessNumber1 und BusinessNumber2. Nun soll BusinessNumber1 verwendet werden wenn dort eine Rufnummer angegeben ist. Ist das Feld leer so soll BusinessNumber2 verwendet werden. Sowohl BusinessNumber1 als auch BusinessNumber2 wurden dazu dem LDAP-Datenbankfeld
Telefon Geschäftlich zugeordnet. Nun Button
edit in der Zeile LDAP-Datenbankfeld
Telefon Geschäftlich drücken und
- Action: Erstes, nicht leeres Feld verwenden.
auswählen.
A database stores the street, house number, zip code and city in a database field, each separated by a "$". For example, the database field contains:
"Street$12$12345$City".
To use this database with the estos MetaDirectory you have to split this merged field and assign it to the LDAP database fields for street, house number, postal code and city. In the Field Mapping Wizard, you assign this one source field to all the target fields that will be populated. In our case these are the fields street, postal code and city. Activate the advanced settings to be able to carry out the configuration that is now necessary.
From the list of LDAP data fields select the entry "Street". On the right side, enter the following information for the regular expressions:
- Search:
"(.*)(\$)(.*)(\$)(.*)(\$)(.*)"
- Replace:
"$1 $3"
- Action: Suchen und Ersetzen
You can immediately see from the regular expression icon whether it is valid. The result list now shows street 12.
The situation is similar for the LDAP data fields zip code and city.
Enter the following values for the "Postcode" field:
- Search:
"(.*)(\$)(.*)(\$)(.*)(\$)(.*)"
- Replace:
$5
- Action: Suchen und Ersetzen
For the "Location" field
- Search:
"(.*)(\$)(.*)(\$)(.*)(\$)(.*)"
- Replace:
$7
- Aktion: Suchen und Ersetzen
Now you have split the source field appropriately and the database fields will have the appropriate field content after replication.