Calculated Field Mappings in Visual Data Mapper
Calc
(Calculated Field) map type is used to provide a programmatic way to configure advanced mappings not easily handled by other mapping types.
In other words, use Calc
to apply tricky custom logic not addressed by Functions, Arrays, and other standard Visual Data Mapper functionality.
Calculated Fields may optionally use source data mappings.
Calculated Field Mappings use the Custom Rule section to define its map details.
At this time, all Custom Rule content must be formatted in json without newline spacing. To that end, it may be useful to develop the Calculated Field script in an editor, then remove newlines before pasting back into the Custom Rule section.
Custom rules are comprised of two main sections:
sourceVariables
- This defines any variables dragged from the Source.ruleExpression
- Written in JavaScript, this defines the custom logic that defines this Calculated Field Mapping.
Without any logic or source fields, the basic format of a Calculated Custom Rule is as follows:
{"sourceVariables":[],"ruleExpression":""}
Walkthrough
A walkthrough of using Calculated field mappings is found in the Help Articles section. See Mapping Calculated Fields.