Functions
A function in Carrot appears as a word followed by parentheses, which may contain one or more explicit values or Carrot fields. All functions are case-insensitive.
A function performs a calculation on specific Carrot data or on the function's content (enclosed within its parentheses), such that the results retrieved by the function return as true, and then again by the clause in which the function is used.
Function | Description |
abs() | Returns the absolute value of a given value. |
asOf() | Returns the result of a Carrot expression on a particular date using either only Primary data, or both Primary and Scenario based data. |
Converts supported datatypes into a Boolean, equal to either true or false. | |
Returns the value of base or variable compensation on a given date. | |
Calculates the base, variable or cash compensation of a person over a specified period of time including all jobs the person has held. | |
Calculates the cost of a job over a specified period of time where the cost of a job includes if multiple people have held that job. | |
date() | Converts input to Date including relative Date input. |
day() | Returns the day of the month of a particular date. |
Returns the number of days off taken between two given dates. | |
Returns the total number of years between two given dates. | |
Returns the total number of months between two given dates. | |
Returns the distance between built-in addresses in ChartHop in the specified units. | |
Returns the last day of a given month. | |
Converts a given value of type Money into a String, while retaining the currency type in the String output. Optionally specify the format and locale of the returned value. | |
Converts a given value into a String, rounded to specific decimal place. Accepts Number, Money, or Percent datatypes. | |
Converts a given value of type Number into a String. | |
Converts a given value of type Percent into a String. | |
Converts a given value of type Date into a String. | |
Returns all of the shares that were granted between two specified dates. | |
length() | Returns the number of items in a list or set, or the length of a String. |
max() | Returns the highest of all values passed as parameters. |
mean() | Returns the mean value of all the passed parameters, excluding Nulls. |
money() | Converts a given value to datatype Money, including currency conversion. |
month() | Returns the ordinal number of the month of a particular date, from 1-12, where 1 is January, 2 is February, and so on. |
min() | Returns the lowest of all values passed as parameters. |
Given a date, returns the next upcoming anniversary of that date. | |
number() | Given a value, returns that value as a Number. |
Given a value of type String, returns that value in plural form. | |
Given a value, returns that value as a Percent. | |
random() | Returns a random Number between 0 and 1. |
round() | Rounds a given value to the defined number of decimal places. |
Rounds a given value to the next largest integer. | |
Rounds a given value to the next smallest number. | |
string() | Given a value, returns that value as a String. |
Given a String and specified parameters, returns a part of that String. | |
Given a Date, returns the value of shares on that date. | |
Returns the first day of a given month. | |
split() | Divides a String into a list of Strings. |
Given a start date and end date, returns the share price value of stock that will vest over that period of time. | |
Given a start date and end date, returns the number of shares that will vest over that period of time. | |
year() | Returns the Gregorian calendar year of a particular date. |
