Skip to main content
Mitratech Success Center

Transformation and Validation

Caution: This feature is for advanced DataStore®DSX users.

Location masks (as configured as part of a Content Field’s Position) containing empty capturing groups () are modified when data is indexed. The contents of any transformation and validation masks associated with the field are inserted into the empty group.

Note: Transformations can be applied to Content fields only. That is, Transformations are not available for manually entered field values.

Location Mask with Empty Capturing Group and Validation Mask

Consider a location (as configured in the Positions text box)

a()b

which defines ‘the letter a followed by something and then the letter b’ but has an empty capturing group. On its own, this does nothing. However, the behaviour changes when a Validation mask is configured.
Configure a validation mask on the Validation tab of the Text field:

[A-Z]+

which defines the capturing group as must containing an upper-case letter, then, when the index engine runs, it will use as its location mask:

a([A-Z]+)b

which defines ‘the letter a followed by an upper case letter followed by the letter b’.

With Validation Mask and Transformation Mask

Consider a location (as configured in the Positions text box)

a()b

which defines ‘the letter a followed by something and then the letter b’ but has an empty capturing group. On its own, this does nothing. However, the behaviour changes when a Validation mask is configured.

Configure a validation mask on the Validation tab of the Text field:

[A-Z]+

which defines the capturing group must contain an upper-case letter.
If the field also has a transformation mask (as configured in Transformation Masks on the Validation tab):

[0-9]+([A-Z]+)

which defines ‘a number followed by an upper case letter’.
When the index engine runs, it will work as if two positions had been created with these location masks:

a([A-Z]+)b

a([0-9]+(?:[A-Z]+))b

Effectively, the index engine is searching for values that match the validation mask or any available transformation masks and capturing the whole value matched by the validation or transformation mask.

  • Was this article helpful?