Mapping Data
Last updated
Last updated
Mapping in appRules is unlike mapping in legacy ETL tools. In appRules, mapping is another option for setting record values before each record is saved. You can compose projects that do not utilize any mapping to set record values as you can use extension functions and other options to set data field values. In addition, you can also use the SetValues, TransformValues, ClearRecord and CopyRecord activities from the appRules Base module to set record values. However, the MapAndSetFields activities are the most commonly used method of setting record field values in appRules projects.
Most modules in appRules include a MapFields activity for mapping. For example, to map Salesforce account records with a sqlserver datasource, drag and drop the MapAndSetFields activity from the Salesforce toolbox on to the designer:
Select a Source (this will be the main one but you will be able to map targets fields with other sources using the DataFieldValue source value) and Target then click on the FieldMaps property button. The Field Mapping window will be displayed:
The MapFields window shows the fields in the entity. Fields required by the target are flagged. Use a Source / Value combination to populate the field values. You only need to map the fields that you wish to include and the required fields. Over fifty built-in Source/Value options are available including DataFieldValue (to set the field from the Source if one was selected) and CustomFunction (to set the field from a function). You can utilize any number of MapAndSetFields activities to set values in any number of Targets in your appRules projects.
You can set a mapcondition per field (for example to not set the target value if the source value is null)