Storing field data in tags
Storing the value of a field in a tag is most useful when a message is received. You can, however, store a field in a tag when a message is published with dynamically populated field values.
- Copy
- Regular Expression
- Copy Type
- XPath Query
- JSONPath Query
The Copy action stores the untransformed value in the specified tag.
If Regular Expression, XPath Query, or JSONPath Query is specified as the action type, you must provide additional details.
To store only the field values that match the entered expression or query, select the Match? option.
To store the full response or the complete data that is returned by the Regular Expression, XPath Query, or JSONPath Query, select the Data option.
To extract a portion of repetitive data, the relevant part of which is identified only by its position, select the Instance option and provide an instance number if there are multiple instances. The default value is 1.
For example, if the value of the field is '12:02:05', to extract the minutes portion (02) to be stored in a tag, specify the following regex:
(\d\d)
This expression specifies a group definition that matches the numeric parts of the data. In this case, since you are interested in the minutes entry, you would extract the instance 2.
To help in building regular expressions, XPath queries, or JSONPath queries, a testing utility is available. By clicking Test, you can verify your expression against any arbitrary content without waiting for a full test to run to show the results.
Values to validate against can be entered in the Document field. Alternatively, you can click Browse to locate and select a test document, the contents of which are loaded in the Document field.
Selecting transports and formatters
Using repeating and optional elements
Adding attachments to a message