The Calculator lets you transform and manipulate data as it is mapped from one data source to another. In fact all transformations "pass through” the calculator even if they are simple one-to-one field mappings. But the Calculator will be used when you want to modify the value of a target data source field. Calculations determine the value of an output field based on values already in source or target data source fields or they can look up constants or calculate functions not related to values already in the data sources. A scripting tool lets you build a calculation of arbitrary complexity that can access any other system, or perform some user defined function.
A calculation can be made up of a combination of fields, constants, operators and functions, use these links to find out more about the range of these elements available. In addition there are Variable utilities which use local and global variables, and Error handling utilities.
To open the Calculator: press the Calculation button when it is active on a screen, for example when a target field is selected on the Mapping screen, or simply double-click a target field on this screen. You can also access a variant of the screen in other parts of the system, for example after pressing This Filter radio button on the Properties tab to create a filter for a data transfer action, see Select filters for more, or when you set a Decision node on a workflow activity.
To get help on Calculator Functions and other elements: The functions and operations used in the Calculator are each the subject of a help topic. Links to these topics are given in Operators, Functions and Constants. You can also select a function or operation at the top of the screen (having expanded the list), then press the Function Help button if this is available at the bottom of the screen, see Calculator properties for more.
The top part of the Calculator window screen gives access to the elements of a calculation, expand the lists by pressing +. Fields (columns) from your current source and target data sources are displayed on the left, and other elements including Calculator functions or operators on the right. Exactly what you see may depend on where you accessed the Calculator, for example from the Mapping tab on a data transfer or from the Properties tab on a data transfer.
Double click an element at the top of the screen to automatically enter it into the area at the bottom of the screen where the calculation is built up. The building up of a calculation is shown as a piece of Jython script. Internally to the system the execution does not necessarily take place as the execution of Jython script, using the built-in Jython script engine. A simple mapping for example short circuits the scripting engine to carry out the mapping directly between the data elements.
A field mapping is the simplest form of calculation, and specifies that the data for a target field comes from a source field. However most fields in a target data source will more complex, perhaps made up of more than one source field, only part of a source field, or perhaps have values based on information unrelated to source fields such as date information or functions, see Mapping for more. The Calculator is used for these cases.
Other related topics include Calculator properties, Fields, Constants, Operators, Functions, Variable utilities, Error handling utilities, Mapping, Select filters, Example JDBC mapping