Concatenate Field Operations

Concatenate field operations concatenate a STRING or BLOB field value to another STRING or BLOB field.

When a STRING is concatenated to the end of a BLOB, the terminating NULL character of the STRING is not added. When a BLOB is concatenated to the end of a STRING, the BLOB's data overwrites the original STRING's terminating NULL character and a terminating NULL character is added at the end of a BLOB's data.

In this example, a BLOB field is concatenated to a STRING field.
SelectiveUpdate:DiameterGateway:Input:Element 12345:How many operations do you want to enter?1
SelectiveUpdate:DiameterGateway:Input:Element 12345:Operation 1:What operation do you want to perform?concat_field
SelectiveUpdate:DiameterGateway:Input:Element 12345:Operation 1:ConcatField:What is the destination field's name?main:String
SelectiveUpdate:DiameterGateway:Input:Element 12345:Operation 1:ConcatField:What is the source field's name?main:Blob
Note: The destination is the destination + source.

For example, if the String field value is "Hello" and the Blob field value is "World", the concatenated result is "HelloWorld".

Note: When the types of the fields differ (STRING and BLOB, or BLOB and STRING), it is possible that the resulting field is not correct. This happens when the BLOB's data has a NULL character in it. In the example above, if the BLOB field value was "W\00rld", the resulting field would be "HelloW".

Working with Scalars

The following table lists the scalar element selectors you can use when working with sequences of scalars.
Table 1. Scalar Selectors
Selector Description
selected_scalar_element Use the selected element in a scalar sequence. When processing a sequence of scalars, if the sequence element in a selection key detects a match and the action value is select, the selected_scalar_element variable is changed to point to the data in the matched sequence element. The selector that is changed is determined by the action value.
prev_selected_scalar_element Use the previous selected_scalar_element. The prev_selected_scalar_element changes every time the selected_scalar_element value is changed and contains the previous value of the selected_scalar_element.
saved_scalar_element Use the last saved MDC. When processing a sequence of scalars, if the sequence element in a selection key detects a match and the action value is save, the saved_scalar_element variable is changed to point to the data in the matched sequence element. The selector that is changed is determined by the "action" value.

For more information about action values, see the discussion about selection keys in MATRIXX Integration.

The scalar element selectors can be used only when answering the following questions:
  • ConcatField:What is the source field's name?
  • CopyField:What is the source field's name?

The result of a successful match after all of the selection key sections have been processed is a collection of MDCs and scalar elements (the SelectorArray). Each MDC and scalar element in the SelectorArray can be referenced by using one of the selectors.