Mapping rules that are set to be included are used generates JavaScript code to perform the mapping. Each generated line is prefixed with a comment line that contains the mapping rule's identifier. The code is displayed in the Mapping Code tab and is editable.
Generating Mapping Code
To generate mapping code:
- Ensure you have reviewed the mapping rules and selected those you want to generate code for.
Select the Generate Code button.
Any previously generated code and edits made to it will be overwritten.
- The mapping code is displayed in the Mapping Code panel.
- Check-in your change, if required.
Reverting Mapping Code
When you select the Generate Code button, the Intelligent Mapper saves the existing version of the mapping code and the mapping rules selected to generate that mapping code before overwriting the mapping code with the re-generated code. To undo your most recent action of generating mapping code and revert to the overwritten version:
Select the Revert Code button to display the Confirm Revert dialog. The button is only enabled if there is mapping code to revert to.
- In the Confirm Revert dialog, select:
- The Revert Code Only button to revert only the mapping code.
- The Revert Both button in to revert both the mapping code and the mapping rules' selection.
- The Cancel button to abort reversion.
- Check-in your change, if required.
Editing Mapping Code
To edit the mapping code:
- Edit the mapping code in the Mapping Code panel.
- Select the OK button.
- Check-in your changes.
You can use the HAPIMessage Object methods to modify the generated code.