Advanced Built-In Functions Printable Resource
Advanced Built-In Functions Printable Resource
Pro tip: Select and click on the function and the details will be displayed.
Date Functions
DateFormat
Useful when you need to use date fields that require specific formatting.
Example: {DateFormat("2022-11-12", "MM-dd-YY")} to show a date of 11-12-22
Note: You can also used TODAY and DateADD with it.
DateParse
Useful for when you need to convert a string to a date.
Number Functions
NumberFormat
Allows you to format a number in a defined patterns
Round
Rounds a number to a defined specification.
You can choose UP, DOWN, or FLOOR.
StringReplace
Allows you to modify and parameterize a body of text.
StringTrim
Trims whitespace from a string. You can choose trim leading or trailing whitespaces
from a string.
University of Provar
TestCase Functions
TestCaseName
Returns the current test case name.
TestCaseOutcome
Returns the outcome of the test case. The outcome depends on the steps executed
before the function calling step. This returns Successful if the test case is passing and
Failed if the test case if failing.
TestCasePath
Returns the path of the test case.
TestCaseSuccessful
Returns if the test case is successful. It will return the boolean value True if the test case
is passing, False if the test case is failing.
TestRunErrors
Returns all of the errors that occurred during the test run. This is useful during batch
execution. You can use this function at the beginning or at the end of a test case. As a
recommended practice, we suggest you leverage this function at the end of a test case.
TestCaseErrors
Returns the list which contains all of the errors that came before running this function.
Other Functions
Count
Allows you to count the number of items in a list. For example, it can be useful to check
the number of values returned from a SOQL or SQL query.
Not
Negates a condition and will return a boolean value.
IsSorted
Tests whether a supplied list of values is sorted in Ascending or Descending order.
GetEnvironmentVariable
Returns the System and UserDefined environment variable.
GetSelectedVariable
Returns a selected environment. This is useful if you want to run the same test case in
different environments.