Stay organized with collections
Save and categorize content based on your preferences.
Mathematical functions
This page describes the additional set of predefined Jsonnet functions for the Data Transformer Script task available in Application Integration.
Before you begin
To use the following predefined functions, you must import the functions library in your script. Importing the functions library lets you use both the standard Jsonnet functions and the predefined Data Transformer functions.
Application Integration supports Jsonnet functions library v0.20.0. For information about the Jsonnet standard functions, see Jsonnet Standard Library.
Is Decimal
Syntax
isDecimal(num)
Description
Checks if the given number is a decimal.
Input parameter
num: The input number.
Return type
BOOLEAN
Output
Returns TRUE if the number is a decimal and FALSE otherwise.
Is Even
Syntax
isEven(num)
Description
Checks if the given number is even.
Input parameter
num: The input number.
Return type
BOOLEAN
Output
Returns TRUE if the number is even and FALSE otherwise.
Is Integer
Syntax
isInteger(num)
Description
Checks if the given number is an integer.
Input parameter
num: The input number.
Return type
BOOLEAN
Output
Returns TRUE if the number is an integer and FALSE otherwise.
Is Odd
Syntax
isOdd(num)
Description
Checks if the given number is odd.
Input parameter
num: The input number.
Return type
BOOLEAN
Output
Returns TRUE if the number is odd and FALSE otherwise.
Random Number
Syntax
randomNumber(lowerBound, upperBound)
Description
Generates a random real number between a specified range.
Input parameter
lowerBound: Lower range value (inclusive). Default value is 0.
upperBound: Higher range value (exclusive). Default value is 1.
Return type
A real number.
Output
Returns a random real number between lowerBound and upperBound.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-29 UTC."],[],[]]