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.

Image of the Store tab.
You can store the value under the following action types:
  • Copy
  • Regular Expression
  • Copy Type
  • XPath Query
  • JSONPath Query
If you select the Append to list of values option, the tag is updated as a list of values (for example, {val1, val2, val3}) when new values are stored.

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.

Image of the options for the Regular Expression action type.

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.

Note: When you extract data by using regular expressions, use brackets to indicate what is to be extracted rather than what is to be matched.

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.

Messages

Selecting transports and formatters

Message headers

Message bodies

Using repeating and optional elements

Adding attachments to a message

Configuring the XML message properties for test actions

The Field Editor