The function ecx:merge merges multiple target sources into a single object. Values are kept in a set to prevent duplicates. The value returned is an object type.
Example
All customer purchases are saved in a related data set named Purchases. The data set is linked to the customer ID.
A message includes a special offer to customers who have either:
purchased an electronic product (the value Electronic appears in the ProductType column ), or
paid with their credit card (the value Credit appears in the Payment column).
The expression that combines these values into a single data set is constructed as follows:
${ecx:merge(ecx:filter(user.relatedAttribute['Purchases'], 'ProductType', '==','Electronic'), ecx:filter(user.relatedAttribute['Purchases'], 'Payment', '==', 'Credit'))}
CODE
Structure
ecx:merge(object...)
Parameters
Parameter | Description |
---|
object | Specifies the first set of data to be included in the output. Additional data sets are added as a list, separated by commas. |