Skip to main content
Conga Support

Formula Functions

See the following sections:

Date

Function Javascript Notation Definition
Add X Days (new Date(…)).addDays(…) Add a specified number of days to a date/time field.
Add X Hours (new Date(…)).addHours(…) Add a specified number of hours to a date/time field.
Add X Minutes (new Date(…)).addMinutes(…) Add a specified number of minutes to a date/time field.
Add X Months (new Date(…)).addMonths(…) Add a specified number of months to a date/time field.
Add X Weeks (new Date(…)).addWeeks(…) Add a specified number of weeks to a date/time field.
Add X Years (new Date(…)).addYears(…) Add a specified number of years to a date/time field.
Day of Month (1-31) … .getDate() Returns the day of month for the specified date.
Day of Week (0-6) … .getDay() Returns the zero-based day of the week (0=Sunday, 6=Saturday).
Hour of Day (0-23) … .getHours() Returns the zero-based hour for the specified date.
Is After … .isAfter(…) Returns true if the first date occurs after the second date. If a second date is not specified, Now is used.
Is Before … .isBefore(…) Returns true if the first date occurs before the second date. If a second date is not specified, Now is used.
Is Between … .between(…,…) Returns true if the specified date is between or equal to the specified start and end dates.
Is Blank … == null Checks if a reference is to an empty grid cell. It returns true or false.
Is Equal To … === … Checks if a numeric argument is equal in value to a second numeric argument. If so, it returns true.
Is In Next X ….inNext(…numberOf…,"…DaysWeeksMonthsOrYears…") Returns true if the date occurs within the next specified number of days, weeks, months, or years of the current date.
Is In Previous X ….inLast(…numberOf…,"…DaysWeeksMonthsOrYears…") Returns true if the date occurs within the prior specified number of days, weeks, months, or years of the current date.
Is Not Blank … != null Checks if a reference is to a populated grid cell. It returns true or false.
Is Not Equal To … !== … Checks if a numeric argument is not equal in value to a second numeric argument. If so, it returns true.
Is Today (…).between(Date.today(), Date.parse("tomorrow")) Returns true if date value is todays date.
Is Weekday … .isWeekday() Returns true if the date is a weekday (Monday-Friday).
Minutes (0-59) … .getMinutes() Returns the zero-based number of minutes past the hour, for the specified date.
Month (0-11) … .getMonth() Returns the zero-based month (0=January, 11=December) of the specified date.
Now (new Date()) Returns the current date and time.
Today (Date.today()) Returns the current date.
Value (new Date(…year…,…month…,
…day…,…hour…,…minutes…))
Creates a new date with the specified year, month, day, hours and minutes.
Year … .getFullYear() Returns the year of the specified date.

For additional information see: https://github.com/datejs/Datejs

Format

Function Javascript Notation Definition
As Currency kendo.format("{0:c}", …) Formats a numeric value as currency with a dollar sign, for example: $1234.56.
As Date kendo.format("{0:d}", …) Formats a numeric value as a date in the form m/d/yyyy.
As DateTime kendo.format("{0:g}", …) Formats a numeric value as a date and time in the form M/d/yyyy h:mm tt.
As Decimal kendo.format("{0:n}", …) Formats a numeric value as a floating-point number, for example: 1234.56.
As Number kendo.format("{0:n0}", …) Formats a numeric value as an integer, for example: 1234.
As Time kendo.format("{0:hh:mm tt}", …) Formats a numeric value as time in the form hh:mm tt.

Logic

Function Javascript Notation Definition
And … && … Checks whether all arguments are true. If so, it returns true.
Group Selected (…) Logically groups a statement for order of operations.
If (…if…) ? (…then…) : (…else…) Checks whether a condition is met. It returns one value if true and another value if false.
Is Blank … == null Checks if a reference is to an empty grid cell. It returns true or false.
Is Equal To … === … Checks if a numeric argument is equal in value to a second numeric argument. If so, it returns true.
Is Greater Than … > … Checks if a numeric argument is greater than a second numeric argument. If so, it returns true.
Is Less Than … < … Checks if a numeric argument is less than a second numeric argument. If so, it returns true.
Is Not Blank … != null Checks if a reference is to a populated grid cell. It returns true or false.
Is Not Equal To … !== … Checks if a numeric argument is not equal in value to a second numeric argument. If so, it returns true.
Not !(…) Checks whether a condition is not met. If so, it returns true.
Or … || … Checks whether any of the arguments are true. If so, it returns true. If all arguments are false, it returns false.

Number

Function Javascript Notation Definition
Multiply … * … Multiplies two numeric values.
Add … + … Adds two numeric values.
Subtract … - … Subtracts two numeric values.
Divide … / … Divides two numeric values.
Absolute Value Math.abs(…) Returns the absolute value of a number (the number without its sign).
Is Blank … == null Checks if a reference is to an empty grid cell. It returns true or false.
Is Equal To … === … Checks if a numeric argument is equal in value to a second numeric argument. If so, it returns true.
Is Greater Than … > … Checks if a numeric argument is greater than a second numeric argument. If so, it returns true.
Is Less Than … < … Checks if a numeric argument is less than a second numeric argument. If so, it returns true.
Is Not Blank … != null Checks if a reference is to a grid cell that is populated. It returns true or false.
Is Not Equal To … !== … Checks if a numeric argument is not equal in value to a second numeric argument. If so, it returns true.
Max Math.max(…1…,…2…,…) Returns the maximum value in a set of values.
Min Math.min(…1…,…2…,…) Returns the minimum value in a set of values.
Random (0-1) Math.random() Returns a random number greater than or equal to 0 and less than 1, evenly distributed.
Round Math.round(…) Rounds a number to a specified number of digits.
Round Down Math.floor(…) Rounds a number down, to the nearest integer or to the nearest multiple of significance.
Round Up Math.ceil(…) Rounds a number up, to the nearest integer or to the nearest multiple of significance.
Exponent Math.pow(…base…,…exp…) Returns the result of a number raised to a power.
Square Root Math.sqrt(…) Returns the square root of a number.

Text

Function Javascript Notation Definition
Append … + … Appends two text strings.
Contains (… .indexOf(…) > 0) Returns true if a string contains a specified value.
Index Of …indexOf(…substring…) Returns the index if a string appears in the value, or -1 if the value does not contain the string.
Is Blank … == null Checks if a reference is to an empty grid cell. It returns true or false.
Is Equal To … === … Checks if a text string is equal in value to a second text string. If so, it returns true.
Is Not Blank … != null Checks if a reference is to a grid cell that is populated. It returns true or false.
Is Not Equal To … !== … Checks if a text string is not equal in value to a second text string. If so, it returns true.
Replace … .replace(…find…,…replace…) Replaces part of a text string with a different text string.
Substring … .substr(…startIndex…,…length…) Returns a substring of the value starting at a specified index and with a specified length.
Value "…" A specified text value.

Advanced

Function Javascript Notation
For Each Object.each(…list…, function(item){
  // Use item
});
Function (required) function(){
  // comments
  return …;
}()
If if (…test…) {
  …then…
}
else {
  …else…
}
Regular expression /…regex…/.test(…string…)
Variable var …x… = …y…;
  • Was this article helpful?