You can use the Remove transform to delete an element from the Environment tree or to remove an element within an Overrides group.
For example, you can use the Remove transform to remove child elements from the target structure if you copy a complex structure from source to target.
The Remove transform does not have any inputs wired to the transform.
You can define a Remove transform on a simple, complex, or repeating output element.
Define when the transform is applied at run time
You can define multiple connections between input elements and the Remove transform. You can then use these input elements in a conditional expression that defines the condition under which the transform is applied. If the condition evaluates to true, the transform is applied.
Alternatively, to define the conditional expression, you can call a static method on an imported Java™ class. You can also create a complex expression comprising XPath, Java and extension functions such as iib:getUserDefinedProperty("propertyname").
To add inputs to the transform, you can define supplement connections between input elements and the transform.
You configure the expression in the Condition tab that is available in the Properties page of the transform.
Modifying repeating elements
If you need to remove some elements of a repeating structure, use the For Each transform and define conditional expressions for each index to determine whether the element is moved or removed.
For more information, see For Each.
This example shows how to copy an input structure to the output, and then delete one element from the output message structure.
You define a map with a Move transform between the input element and the output element.
You click the element that you want to delete (H2) from the output structure, and then drag and drop the mouse onto the canvas. An Assign transform is added. You change the Assign transform to the Remove transform.
As soon as you select the Remove transform, the Graphical Data Mapping editor adds an Overrides function that groups the Move transform and the Remove transform. The Overrides function specifies that the input element H is copied over unchanged, and then element H2 is deleted from the output structure.