1.8

Table Of Contents
subsequently available.
Keyboard shortcuts for the script editor are listed in the following topic: "Keyboard shortcuts" on
page738.
Syntax rules
In the DataMapper, all scripts must be written in JavaScript, following JavaScript syntax rules.
For example, each statement should end with ; and the keywords that can be used, such as var
to declare a variable, are JavaScript keywords. There are countless tutorials available on the
Internet to familiarize yourself with the JavaScript syntax. For a simple script all that you need to
know can be found on the following web pages: http://www.w3schools.com/js/js_syntax.asp
and http://www.w3schools.com/js/js_if_else.asp. A complete JavaScript guide for beginners
can be found here: https://developer.mozilla.org/en-US/docs/Web/JavaScript.
DataMapper API
Certain features that can be used in a DataMapper script do not exist in the native JavaScript
library. These are additional JavaScript features, designed for use in Connect only. All features
designed for use in the DataMapper are listed in the DataMapper API (see DataMapper API).
External JavaScript libraries
The External JS Libraries box on the Settings pane lets you add JavaScript libraries to your
configuration and displays all the libraries that have been imported (see "Settings pane" on
page203).
You can use JavaScript libraries to add more JavaScript functionality to your data mapping
configuration. Any functions included in a JavaScript library that is imported in a data mapping
configuration will be available in Preprocessor scripts as well as Action tasks, Post functions
and JavaScript-based extraction steps.
Take the following JavaScript function, for example:
function myAddFunction(p1, p2) {
return p1 + p2;
};
Page 256