Tag types also have a tag ID format. The format is defined for each tag type and comprises a collection of attribute values in a specified format. You can define this format using a regular expression (regex) and an ordered collection of attributes – attributes that belong to the tag type. In addition, a sample pattern should be defined - this will allow the tag ID validator to provide suggested values for a tag's ID when errors occur.
To define the tag ID format, select the “Define tag ID format” menu option for a tag type.
This opens the “Define Tag ID format” form. First, enter a regular expression which corresponds to the format allowed for the Tag ID. Contact our support team for guidance on this, if required.
Next, choose a selection from the collection of attributes assigned to the tag type. The attributes are shown in a dropdown – one or more can be chosen and reordered. It is important that the number of attributes and their order match the tag ID regex. Finally, to allow the tag ID validator to provide suggested values for a tag's ID when errors occur, a sample pattern should be defined. When a pattern is supplied which matches the tag ID format, then the attribute values are shown in the table.
An error will be shown when the pattern does not match the regex.
An error will also be shown when the pattern supplied matches the tag ID format, but does not have unique grouped parts.
When tags are validated, the pattern will be used to provide some alternative options for tag IDs if an error is raised. In example upload below, we see a warning for one tag (QQQ-ZZZ-EEE) and an error for a different tag (TTTEEERRR).
The tag with Tag ID QQQ-ZZZ-EEE has a mismatched part - the error above states that in the Tag ID the equipment code is ZZZ, whereas the attribute in the CSV has the value BBB. We therefore raise the mismatch error, and create a warning to say that we may need to correct the Tag ID.
For Tag TTTEEERRR we see that the Tag ID does not meet the naming specification, and so therefore we use the tag attributes to construct a possible alternative TTT-EEE-RRR.