Functions
- 1 Overview
- 2 Formatting Rules
- 3 Function Categories
- 4 Conditional Functions
- 5 Credential Functions
- 6 Database Connection Functions
- 7 Date Functions
- 7.1 Checks if Date Argument Equals Today's Date
- 7.2 Resolve to Current Date and Time
- 7.3 Resolve to Current Date and Time (Advanced)
- 7.4 Resolve to Current Unix Epoch Time
- 7.5 Return Date with Offsets
- 7.6 Return Date with Offsets (Advanced)
- 7.7 Return Date with Time Zone
- 7.8 Return Day of Week
- 7.9 Return Days between Dates
- 7.10 Return Non-Business Day of Month
- 7.11 Return Nth Business Day of Month
- 7.12 Return Nth Day of Month
- 7.13 Return Number of Business Days between Dates
- 8 Mathematical Functions
- 8.1 Add
- 8.2 Divide
- 8.3 Multiply
- 8.4 Return Absolute Value
- 8.5 Return Modulo
- 8.6 Subtract
- 9 Other Task Functions
- 10 Output Functions
- 10.1 Output CSV Record Count
- 10.2 Output CSV Record Value Count
- 10.3 Output CSV Record Value
- 10.4 Output TSV Record Count
- 10.5 Output TSV Record Value Count
- 10.6 Output TSV Record Value
- 10.7 Output CSV Record Count From Task
- 10.8 Output CSV Record Value Count From Task
- 10.9 Output CSV Record Value From Task
- 10.10 Output TSV Record Count From Task
- 10.11 Output TSV Record Value Count From Task
- 10.12 Output TSV Record Value From Task
- 10.13 Output Delimited Value Count
- 10.14 Output Delimited Value
- 10.15 Output Delimited Value Count From Task
- 10.16 Output Delimited Value From Task
- 10.17 Task Instance Output
- 10.18 Sibling Task Instance Output
- 10.19 Task Instance Output Number of Lines
- 10.20 Sibling Task Instance Output Number of Lines
- 10.21 Task Instance Output by Specific Line(s)
- 10.22 Sibling Task Instance Output by Specific Line(s)
- 10.23 Task Instance Output by Line(s) Matching Regular Expression
- 10.24 Sibling Task Instance Output by Line(s) Matching Regular Expression
- 10.25 Task Instance Output By XPath
- 10.26 Sibling Task Instance Output By XPath
- 10.27 Task Instance Output By JsonPath
- 10.28 Sibling Task Instance Output By JsonPath
- 10.29 Task Instance Output By JsonPath As Array
- 10.30 Sibling Task Instance Output By JsonPath As Array
- 10.31 Task Instance Output Path
- 10.32 Sibling Task Instance Output Path
- 11 SAP Connection Functions
- 12
- 13 Script Functions
- 14 SQL/Stored Procedure Functions
- 14.1 Return Column Names for SQL Results from Current Task
- 14.2 Return Column Names for SQL Results from Sibling Task
- 14.3 Return SQL Results from Current Task
- 14.4 Return SQL Results from Sibling Task
- 14.5 Return SQL Warnings from Current Task
- 14.6 Return SQL Warnings from Sibling Task
- 14.7 Return String Value of Row/Column by Column Name
- 14.8 Return String Value of Row/Column by Column Number
- 14.9 Return String Values of Columns
- 15 String Functions
- 15.1 Escape Sequences
- 15.2 Convert Characters in Value to Lower Case
- 15.3 Convert Characters in Variable to Lower Case
- 15.4 Convert Characters in Value to Upper Case
- 15.5 Convert Characters in Variable to Upper Case
- 15.6 Escape Characters in Variable Using XML Entities
- 15.7 Escape Characters in Variable Using JSON String Rules
- 15.8 Escape Characters in Variable Using JavaScript String Rules
- 15.9 Escape Characters in Variable Using HTML Entities
- 15.10 Escape Characters in Variable as a Literal Pattern
- 15.11 Randomly Generate a String
- 15.12 Replace Substring of Value with Regular Expression
- 15.13 Replace Substring of Variable with Regular Expression
- 15.14 Return Base64 Encoded String
- 15.15 Return Copy of Value with Whitespace Omitted
- 15.16 Return Copy of Variable with Whitespace Omitted
- 15.17 Return Index of Substring in String Value
- 15.18 Return Index of Substring in String Variable
- 15.19 Return Index of Substring Plus Offset in String Value
- 15.20 Return Index of Substring Plus Offset in String Variable
- 15.21 Return Index of Rightmost Occurrence of Substring in String Value
- 15.22 Return Index of Rightmost Occurrence of Substring in String Variable
- 15.23 Return Index of Rightmost Occurrence of Substring Plus Offset in String Value
- 15.24 Return Index of Rightmost Occurrence of Substring Plus Offset in String Variable
- 15.25 Return Length of Value
- 15.26 Return Length of Variable
- 15.27 Return New String that is Substring of Value
- 15.28 Return New String that is Substring of Variable
- 15.29 Return URL-Encoded String
- 15.30 Variable By XPath
- 15.31 Variable By JsonPath
- 15.32 Variable By JsonPath As Array
- 15.33 Variable Number of Lines
- 15.34 Variable By Specific Line(s)
- 15.35 Variable By Line(s) Matching Regular Expression
- 15.36 Variable Path
- 15.37 Variable CSV Record Count
- 15.38 Variable CSV Record Value Count
- 15.39 Variable CSV Record Value
- 15.40 Variable TSV Record Count
- 15.41 Variable TSV Record Value Count
- 15.42 Variable TSV Record Value
- 15.43 Var Delimited Value Count
- 15.44 Var Delimited Value
- 16 System Functions
- 17 Universal Task Functions
- 18 Web Service Functions
- 18.1 Raw Output from Web Service Task
- 18.2 Raw Output from Sibling Web Service Task
- 18.3 XML Output Data from Web Service Task
- 18.4 XML Output Data From Sibling Web Service Task
- 18.5 JSON Output Data From Web Service Task
- 18.6 JSON Output Data From Sibling Web Service Task
- 18.7 JSON Output Data As Array From Web Service Task
- 18.8 JSON Output Data As Array From Sibling Web Service Task
Overview
Variables and functions can be used in free-text fields within tasks and workflows. When a variable or function is specified in a free-text field, the Controller inserts its value into the field when the task or workflow is run.
Also, triggers can pass variables and functions into the tasks and workflows they launch.
Universal Controller supports a number of functions that can be specified in free-text fields. They are resolved when a task instance runs or when a Set Variable action containing a function is executed.
Functions are entered using the following formats:
${_function}
${_function(arg1, ..., argN)}
Formatting Rules
Functions must be written either:
In all lower-case characters.
Exactly as shown in the tables on this page.
Functions have zero, one, or multiple parameters.
Each function parameter is one of three specific types:
String
Integer
Boolean
String parameters must be enclosed in single or double quotation marks.
Integer and Boolean parameters can be enclosed in single or double quotation marks.
Optional parameters are identified on this page by being enclosed in [square brackets]. When copying a function from the documentation, be sure to remove the square brackets; otherwise, the function will not resolve.
If a function has more than one optional parameter, any optional parameters preceding a specified optional parameter must be included in the function's parameter list. For example:
For function
${_responseJsonPath('pathExpression'[,'defaultValue','delimiter',prettyPrint])}, usage${_responseJsonPath('.outputData','','',true)}would be valid, whereas${_responseJsonPath('.outputData',,,true)}would not be valid.For function
${_formatDate(['date_time', 'format', day_offset, use_business_days, hour_offset, minute_offset, timezone])}, usage${_formatDate('2018-09-01','',0,true)}would be valid, whereas${_formatDate('2018-09-01','',,true)}would not be valid.
All functions allow nesting to two levels. That is, a function can be an argument to another function, which itself can be an argument to another function.
You must use a double underscore preceding the name of a first-level nested function.
You must use a triple underscore preceding the name of a second-level nested function.
For example, for 2nd day of next month less one Business Day:
${_formatDate('${__dayOfMonth(2,'${___dateadv('yyyy-MM-dd',0,1)}')}','',-1,true)}
Function Categories
Functions are listed alphabetically within the following categories on this page:
Conditional Functions
Return Conditional Value Depending on Equality of String Parameters
Description | Returns a conditional value depending on the equality of two string parameters. |
|---|---|
Syntax |
|
Parameters |
|
Examples |
|
Return Conditional Value Depending on Value of Boolean Parameter
Description | Returns a conditional value depending on the value of a boolean parameter. |
|---|---|
Syntax |
|
Parameters |
|
Example |
|
Credential Functions
Return Key Location of a Credential
Description | Returns a token representing the Credentials#Resolvable Credentials Key Location that you want to embed. |
|---|---|
Syntax |
|
Parameters |
|
Example |
|
Return Passphrase of a Credential
Description | Returns a token representing the Credentials#Resolvable Credentials Passphrase that you want to embed. |
|---|---|
Syntax |
|
Parameters |
|
Example |
|
Return Token of a Credential
Description | Returns a token representing the Credentials#Resolvable Credentials Token that you want to embed. |
|---|---|
Syntax |
|
Parameters |
|
Example |
|
Return User Name of a Credential
Description | Returns a token representing the Credentials#Resolvable Credentials Runtime User that you want to embed. |
|---|---|
Syntax |
|
Parameters |
|
Example |
|
Return User Password of a Credential
Description | Returns a token representing the Credentials#Resolvable Credentials Runtime Password that you want to embed. |
|---|---|
Syntax |
|
Parameters |
|
Example |
|
Database Connection Functions
Returns Property of a Database Connection
Description | Returns a token representing the property associated with a Database connection. |
|---|---|
Syntax |
|
Parameters |
|
Example |
|
Date Functions
Checks if Date Argument Equals Today's Date
Description | Checks if a date argument is equal to today's date in the specified format. |
|---|---|
Syntax |
|
Parameters |
|
Examples |
|
Resolve to Current Date and Time
Description | Resolves to the current date and time. |
|---|---|
Syntax |
|
Parameters |
|
Examples |
|
Resolve to Current Date and Time (Advanced)
Description | Resolves to the current date and time. |
|---|---|
Syntax |
|
Parameters |
|
Examples |
|
Resolve to Current Unix Epoch Time
Description | Resolves to the current time in milliseconds since Wed Dec 31 1969 19:00:00 GMT-0500 (EST) – the start of Unix epoch time. |
|---|---|
Syntax |
|
Parameters | n/a |
Return Date with Offsets
Description | Returns the date after applying offsets. Optionally, can specify the output format. Whether a holiday is treated as a business day or a non-business day is specified by the Properties#Exclude Holidays for Business Days Universal Controller system property. |
|---|---|
Syntax |
|
Parameters |
|
Example |
|
Return Date with Offsets (Advanced)
Description | Returns the date after applying offsets. Optionally, can specify the output format. Whether a holiday is treated as a business day or a non-business day is specified by the Properties#Exclude Holidays for Business Days Universal Controller system property. |
|---|---|
Syntax |
|
Parameters |
|