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

AVEVA™ Gateway for 1D Data

Search Criteria Mapping

  • Last UpdatedNov 04, 2025
  • 3 minute read

Normally ObjectID’s are sourced from attribute values extracted per object. But when the input data has no attributes, such as is often the case for Documents, the task is to identify a number of ObjectIDs or tag values from a large string of text. An alternative method to do this efficiently is to use Search Criteria Mapping, which 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 can add one or more search blocks. Search is a sub-block where you can 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>

Therefore, 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.

The identified tags will then 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.

You can use the Transform function to modify the value of a matched pattern:

<SearchCriteria attribute = “Content”>

<Search>

<Patterns createAlias=”false”>

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

<Transforms>

<Keep pattern=”\d{3}”/>

<Compose delimiters=”-“ constructor=”type: {1}, series: {2}”/>

<Remove pattern=”^[A-Z]{1}”/>

<LowerCase/>

<InsertBefore pattern=”^.*$” value=”InsertBefore”/>

<Replace pattern=”\d{3}” value=”619”/>

<UpperCase/>

</Transforms>

</Patterns>

</Search>

</SearchCriteria>

When a Transform node is within a Patterns node, then it supports an optional parameter createAlias, default value of “false”. When createAlias = “true” it will modify the value of the matched pattern and also create an alias to it in the EIWM objects, as shown below:

<SearchCriteria attribute = “Content”>

<Search>

<Patterns createAlias=”true”>

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

<Transforms>

<Keep pattern=”\d{3}”/>

</Transforms>

</Patterns>

</Search>

</SearchCriteria>

An additional association "is identified by" is added to the newly created objects from SearchCriteria.

When the Patterns node doesn't have a Transform node, even if the createAlias attribute is set to true, no additional associations are added to the newly created objects from SearchCriteria.

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