List of functions

Cast Iron® Express® offers a selection of functions for use within mappings. These functions can be used to manipulate the field values being mapped, such as altering the content of strings, performing numeric operations on numbers, and manipulating date and time values.

By default, when you register for a Cast Iron Express account, this function is disabled. To use this additional function, click Add-ons and select the Mapping Functions package. For more information, see Adding function to your Express account.

Table 1. String functions. This table lists and describes string functions
Mapping function Description

Concatenate

Accepts two or more arguments and casts them to string. Returns the string that is the concatenation of the values of its arguments after conversion. The user can also configure prefix and/or postfix strings, plus a delimiter that is inserted between each of the arguments.

Length

Returns an integer equal to the length in characters of the value of the argument. If the value of the argument is the empty sequence, the integer 0 is returned.

Lowercase

Returns the value of the argument after translating every character to its lowercase correspondent as defined in the appropriate case mappings section in the Unicode standard.

Uppercase

Returns the value of the argument after translating every character to its uppercase correspondent as defined in the appropriate case mappings section in the Unicode standard.

Replace

Returns the string that is obtained by replacing each non-overlapping substring of the input that matches the supplied pattern with an occurrence of the replacement string.

Starts with

Returns a boolean result indicating whether the value of the first argument starts with the value of the second argument.

String

Returns the value of the argument represented as a string. This value can be used to cast numeric data types into strings to prevent mappings from displaying a warning.

Substring

Returns the portion of the value of the first argument beginning at the position indicated by the value of the second argument and continuing for the number of characters indicated by the value of the third argument. For substring, there is only one field as "input" to the function. However, for the function, the start index and length values are configured in the function dialog window. In the existing text (and all other descriptions) argument is used in both cases.

Trim

Returns the value of the argument with white space normalized by stripping leading and trailing white space and replacing sequences of one or more than one white space character with a single space.

Table 2. Mathematical functions. This table lists and describes mathematical functions
Mapping function Description

Absolute value

Returns the numeric value (or modulus) of a number without regard to its sign.

Mean

Returns the average of the values in the input sequence, that is, the sum of the values divided by the number of values.

Ceiling

Returns the smallest integer not less than X.

Divide

Returns a result value when the first argument is divided by the second.

Floor

Returns the largest integer not greater than X.

Format

The format-number function converts its first argument to a string by using the format pattern string specified by the second argument and the decimal-format named by the third argument, or the default decimal-format, if there is no third argument.

The formatting options for the second parameter are as follows:
  • 0 - Digit
  • # - Digit (zero shows as absent)
  • . - The position of the decimal point. For example: ###.##
  • , - The group separator for thousands. For example: ###,###.##
  • % - Displays the number as a percentage. For example: ##%
  • ; - Pattern separator. The first pattern is used for positive numbers and the second for negative numbers
The decimal format of the third parameter assists with localization of the number, and the following options can be used:
  • 0 - Digit
  • # - Digit (zero shows as absent)
  • . - Decimal separator or monetary decimal separator
  • - - Minus sign
  • , - Grouping separator
  • E - Separates mantissa and exponent in scientific notation. Need not be quoted in prefix or suffix
  • ; - Separates positive and negative subpatterns
  • % - Multiply by 100 and show as percentage
  • \u2030 - Multiply by 1000 and show as per mille value
  • ¤ (\u00A4) - Currency sign, replaced by currency symbol. If doubled, replaced by international currency symbol. If present in a pattern, the monetary decimal separator is used instead of the decimal separator
  • ' - Used to quote special characters in a prefix or suffix. For example, '#'# formats 123 to #123. To create a single quote itself, use two in a row: # o''clock

Maximum

Returns the largest value of the nodes passed as the argument.

Minimum

Returns the smallest value of the nodes passed as the argument.

Modulo

Returns the modulus, or remainder value after the first argument is divided by the second.

Multiply

Returns the value of all arguments multiplied together.

Number

Converts the argument to a decimal.

Round

Returns the number with no fractional part that is closest to the argument. If there are two such numbers, then the one that is closest to positive infinity is returned.

Subtract

Returns a value whereby the second argument is subtracted from the first

Sum

Returns a value obtained by adding the values in the argument.

Table 3. Boolean functions. This table lists and describes boolean functions
Mapping function Description

Boolean

Computes the effective boolean value of the argument.

Not

Returns true if the effective boolean value is false, and false if the effective boolean value is true.

Table 4. Date functions. This table lists and describes date functions
Mapping function Description

Date Time (Date)

The first argument must be in date format, the second argument is a time format. The result is a DateTime format that has both the date, and time, from the arguments

Date to String (Date)

The second argument is a string that shows how to format the date/time. The following key characters are replaced by parts of the date/time:
  • yy - Last two digits of year. For example, 86 from 1986
  • MM - Two-digit month
  • dd - Two-digit date
  • HH - Two-digit hour
  • mm - Two-digit minutes
  • ss - Two-digit seconds

For example, if the Format Date String function was called with the following input parameters:

dateTime: 2012-02-22T16:18:00.852-08:00

format string: MM/dd/yyyy

locale string: en_US

The following string would be returned: 02/22/2012.

For more information about the Date to String function, see the Format Date String topic in the Studio help section.

Adjust to Timezone (Date)

Converts the TimeDate to hold a particular time zone, or to none. Time zone applied is the second argument, for example:
  • -10H - A timezone of minus ten hours
  • +5H30M - A timezone of plus 5 hours and 30 minutes
  • 0H - A timezone at 0 hours
Table 5. Utility functions. This table lists and describes utility functions
Mapping function Description

Composite

Chains together a series of functions.




Feedback | Notices


Timestamp icon Last updated: Thursday, 2 June 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.api.omniapps.doc/Integrations_ListOfFunctions.html