Rules for extracting attribute fragments used in conjunction with combined attributes and attributes based on existence of other attributes

This tutorial shows in detail how to proceed, if you have more than one pattern in which an item is stored, e.g. CHK-223, BAL778, or GLO_989, and you want to make them uniform.

See also Attribute settings.

Creating a rule for extracting attribute fragments

  1. Navigate to the project to edit, and then click Project Admin in the main menu. The project administration view opens.

  2. Click Model Configuration. The model configuration view opens.

  3. Click Attribute Settings.

  4. Click Split.

  5. In the Rules for Extracting Attribute Fragments section, click Add New.

  6. In Source Attribute field, select "Hierachy Level 10".

  7. In Pattern field, enter the following regex to extract values that matches the first pattern from the attribute, e.g. "Hierarchy Level 10" and stores it in an attribute called "val1".

    (?<val1>[A-Z]{3}-\d{3}[A-Z]?)

  8. Click Test to to display the first matching values.

  9. In the Rules for Extracting Attribute Fragments section, create another rule by selecting Add New.

  10. In Source Attribute field, select "Hierarchy Level 10".

  11. In Pattern Field, enter another regex to extract values that matches the second pattern from the same attribute, but splits them in two subparts and stores it in an attribute called "val2a" and "val2b".

    (?<val2a>[A-Z]{3})(?<val2b>\d{3}[A-Z]?)

  12. Click the Test button to display the first matching values.

  13. In the Rules for Extracting Attribute Fragments section, create another rule by selecting Add New.

  14. In Source Attribute field, select "Hierarchy Level 10".

  15. In Pattern Field, enter another regex to extract values that match the third pattern from the same attribute, but splits them in two subparts and stores it in an attribute called "val3a" and "val3b".

    (?<val3a>[A-Z]{3})_(?<val3b>\d{3}[A-Z]?)

  16. Click the Test button to display the first matching values.

Creating combined attributes

In the following, pieces from "val2a" and "val2b" are combined in a single attribute "val2". The same is done for "val3a" and "val3b", which are combined in "val3".

  1. Navigate to the project to edit, and then click Project Admin in the main menu. The project administration view opens.

  2. Click Model Configuration. The model configuration view opens.

  3. Click Attribute Settings.

  4. Click Combine.

  5. In the Combined Attributes section, select Add New.

  6. In the Abbreviation field, enter "val2". In the Display Name field, enter "val2".

  7. In the Pattern field, enter the correct pattern, including a hyphen ("-").

  8. Select Type as Temporary Attribute and Data Type as String.

  9. Click the Test button to display the first matching values.

  10. In the Combined Attributes section, select Add New.

  11. In the Abbreviation field, enter "val3". In the Display Name field, enter "val3".

  12. In the Pattern field, enter the correct pattern, including a hyphen ("-").

  13. Select Type as Temporary Attribute and Data Type as String.

  14. Click the Test button to display the first matching values.

    Now the pattern in "val2" and "val3" will be the same as in "val1".

Creating attributes based on existence of other attributes

In the following, a single attribute "val" is created and it stores uniform patterns from "val1", "val2", and "val3" attributes.

  1. Navigate to the project to edit, and then click Project Admin in the main menu. The project administration view opens.

  2. Click Model Configuration. The model configuration view opens.

  3. Click Attribute Settings.

  4. Click Derive.

  5. In the Attributes Based on Existence of Other Attributes section, select Add New.

  6. In the Abbreviation field, enter "val".

  7. In the Display Name field, enter Valve Id.

  8. Select Type as Key Attribute and Data Type as String.

  9. In Assign attribute value in order of existence section, in Attribute field, enter "val1".

  10. In Assign attribute value in order of existence section, select Add Attribute.

  11. In Assign attribute value in order of existence section, in Attribute field, enter "val2".

  12. In Assign attribute value in order of existence section, select Add Attribute.

  13. In Assign attribute value in order of existence section, in Attribute field, enter "val3".

    Now you have a single attribute "val", which stores uniform patterns.