Custom values are values (including hard-coded values) and expressions that can be mapped to a target field in either mapping mode or script mode. Expressions can be used anywhere that we refer to using a custom value.
Mapping to a Target Field
Custom values can be added to both unmapped and mapped target fields, as covered below.
Adding a Custom Value to an Unmapped Field
Custom values can be added using a visual interface for any target fields that do not already have a mapping. From either mapping mode or script mode, hover over the target field, then click the add icon to open an actions menu. From the menu, select Add Custom Value:
A custom entry field opens, where you can enter a hard-coded value:
After a custom field is created, to edit the custom value, simply click the field to bring it back to edit mode. Then edit the custom value accordingly.
Adding a Custom Value to a Mapped Field
For fields that already have a mapping, you must enter the value directly in a script on the target field, which can be done in either mapping mode or script mode. To add a new script on a target field, do one of the following:
- Double-click the field name.
- Hover over the target field and click the add icon
These open the editable script area on the target field in script mode, where you can enter the custom value along with any other script logic:
To work within a larger script area, click the popout icon script editor. After opening the full script editor, click the return icon to come back to this screen.in the upper right of the target field to open the full
Removing a Mapping
Removing a Single Field Mapping
To remove a single custom value mapping from a target field (sometimes referred to as unmapping a field), hover over the custom value within the target field and click the delete icon:
If the custom value is used in combination with any other script logic, you must edit the script to remove the custom value mapping, or clear the contents of the target field script to remove the entire mapping. To open the script for editing, click the script iconon the target field. Then manually clear the contents of the target field script to remove the mapping.
Removing Multiple Field Mappings
For mappings on hierarchal schemas, options for removing multiple target field mappings are available within a node's actions menu.
Remove Loop Node and Mappings removes the loop node definition due to mappings that are direct leaf children associated with the loop node, and removes those mappings.
Any other mappings within child loop nodes beneath the parent loop node are preserved, and the node retains its loop node definition if at least one grandchild is mapped.
Remove All Mappings Beneath This Node removes all mappings on fields contained within the node, as well as all mappings on fields contained within child nodes of that node.
Using this action on a root node removes all mappings in a transformation. On selecting this action, a message asks you to confirm that you want to remove mappings.
Remove All Invalid Mappings removes all invalid mappings on fields contained within the node, as well as all invalid mappings on fields contained within child nodes of that node.
For more information about invalid mappings, see Transformation Mapping Validity.