Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Gateway for 2D Data

Search Criteria Mapping

  • Last UpdatedMar 24, 2025
  • 3 minute read

Search Criteria Mapping applies pattern matching recursively so that all matching tags can be identified from an attribute's value and multiple tags can be created.

The Search Criteria mapping entry to create new tags is shown below:

<SearchCriteria attribute = "Content">

<Search>

<Patterns>

<Pattern value = "[A-Z]-\d{3}"/>

<Pattern value = "[A-Z]-\d{3}[A-Z]"/>

</Patterns>

<ClassID value = "Document" />

<ContextID value = "Test"/>

<TemplateID id = "default" />

<Attributes keepUnmappedAttributes = "true">

<Attribute>

<Name value = "Description" />

<Value value = "[Content]" />

</Attribute>

</Attributes>

<Associations>

<Association>

<Type value = "Modified association" />

<TargetID value = "abc123" />

<TargetClassID value = "Document" />

</Association>

</Associations>

</Search>

</SearchCriteria>

This mapping entry searches for matching patterns on the value of the attribute and creates the new tags if any patterns are matched.

SearchCriteria is the main block where you add one or more search blocks. Search is a sub-block where you add Patterns, containing one or more Pattern values. These Patterns will be applied on the attribute's value. The entries for ClassID mapping, Context mapping, Template mapping, Attribute mapping and Association mapping are to be applied for each newly identified tag from the given Pattern value. For each identified tag, a new object will be created and its object ID is by default assigned with the identified tag.

After a text matches a pattern, the relevant tag is created and then no other patterns in the mapping sequence of a search block will be applied to that tag’s text. If multiple Search blocks are configured within the SearchCriteria, then all unmatched parts of the text will be subject to pattern mapping of the subsequent Search blocks.

For example, if an extracted object contains the text "P-101ASDFP-102ASDFP-103" and tags to be identified are P-101A and P-102A, then the Search Pattern will be:

<Search>

<Patterns>

<Pattern value = "[A-Z]-\d{3}[A-Z]"/>

</Patterns>

</Search>

If two Patterns are defined:

<Search>

<Patterns>

<Pattern value = "[A-Z]-\d{3}[A-Z]"/>

<Pattern value = "[A-Z]-\d{3}"/>

</Patterns>

</Search>

The first Pattern successfully identifies the tags P-101A and P-102A, so the second Pattern will not be applied on the remaining part of the text "SDF" and "SDFP-103".

If the order of the Patterns is reversed:

<Search>

<Patterns>

<Pattern value = "[A-Z]-\d{3}"/>

<Pattern value = "[A-Z]-\d{3}[A-Z]"/>

</Patterns>

</Search>

This Search results in the tags P-101 and P-102 and P-103.

If you need to identify P-101A, P-102A and P-103 tags, then use two Search blocks as:

<SearchCriteria attribute = "Content">

<Search>

<Patterns>

<Pattern value = "[A-Z]-\d{3}[A-Z]"/>

</Patterns>

</Search>

<Search>

<Patterns>

<Pattern value = "[A-Z]-\d{3}"/>

</Patterns>

</Search>

</SearchCriteria>

Here, the identified tags will be P-101A and P-102A from the first search block and P-103 from the remaining part of the text "SDF" and "SDFP-103" that is searched in the second Search block.

Notes:

  • For tags associated with graphics, if the Search criteria matches then as many new tags as matched will be created, each inheriting the same attributes and associations as the original, but the original tag is then deleted. This is to ensure hotspotting by the new tags then works as expected.

  • When using SearchCriteria successful pattern matches are not included in the annotated logs if the annotations level is set to ObjectIDTracking as this function only applies to BaseMapping matches. Hence, they also won’t appear in CSV Reports of matched patterns, see Appendix B: CSV Reporting and Appendix C: Tracking Changes in Data.

Related Links
TitleResults for “How to create a CRG?”Also Available in