Configuring a custom scripting function
You can configure a custom scripting function in one of two ways:
- Inline script
- Scripting component
Inline script
Use the Embedded Scripting dialog to configure a custom scripting function with an inline script.
-
Create or open a map.
-
Click Add a function to the map in the Functions column.
The Add a Function dialog opens.
-
Select the Custom Scripting category.
-
Select the Scripting function, then click OK.
The Embedded Scripting dialog opens with Use Inline Script as the default script source.
-
Select a language from the Language list — either Groovy 1.5, Groovy 2.4, or JavaScript.
-
In the Inputs list, do the following:
-
Click the plus icon to add one or more input variables.
-
For each input enter a name, select a data type, and click Add.
-
-
In the Outputs list, do the following:
-
Click the plus icon to add one or more output variables.
-
For each output enter a name and click Add.
-
-
Type the script in the Script to Execute box.
-
To open a larger window for editing and working with script variables, click Edit.
The edit window is similar to a full-function source code editor with features including line numbers, indentation, and syntax highlighting. For JavaScript scripts, the editor also supports syntax validation.
You can customize the code editor by clicking
Actions.
noteIf you prefer to type your script in a plain text box, click
to toggle between the Code Editor and the Plain Text Editor.
-
To save the inline script as a Scripting component for reuse in other maps, do the following:
-
Click Create a Component.
The Create a Scripting Component dialog opens.
-
Type a name for the Scripting component and select a folder in which to store it.
-
If you want to use the new component as the source for this custom scripting function, select Replace Inline Script.
-
Click Create.
The script source changes to Use Scripting Component, and the name of the new component appears in the Map Script field.
-
-
When you are finished, click OK.
The Configure Defaults dialog opens.
-
Enter default values for the input variables.
-
Select a caching method and click OK.
-
Map to the input(s) from the source profile or previous step and map the output(s) to the destination profile or next step.
Scripting component
Use the Embedded Scripting dialog to configure a custom scripting function with a scripting component.
-
Create or open a map.
-
Click Add a function to the map in the Functions column.
The Add a Function dialog opens.
-
Select the Custom Scripting category.
-
Select the Scripting function, then click OK.
-
When the Embedded Scripting dialog opens, select Use Scripting Component as the script source.

-
In the Map Script field, do one of the following:
-
To locate an existing Map Scripting component, click in the field.
-
To create a new Map Scripting component, click
Create.
A new Map Scripting component opens in a separate tab.
-
-
When you are finished, click OK.
-
Map to the input(s) from the source profile or previous step and map the output(s) to the destination profile or next step.