Formula Functions

Formula Functions

Formula functions allows you to create dynamic calculations based on data entered in your form fields. These functions allow you to manipulate dates, times, decimals, selections, and numbers to perform complex logic directly within your forms.

Date Functions

Function

Role

Example

Supported Field Types

YearDiff

Returns the year difference between two date values.

YearDiff (2025/08/06 - 2015/02/11) = 10

Date, Date-Time

MonthDiff

Returns the month difference between two date values.

MonthDiff (2025/07/04 - 2024/06/18) = 13

Date, Date-Time

DayDiff

Returns the day difference between two date values.

DayDiff (2025/07/16 - 2025/07/01) = 15

Date, Date-Time

BusinessDayDiff

Returns the number of days that are available for selection between two given dates excluding holidays.

BusinessDayDiff (2023/07/19 - 2023/06/28) = 22

Date, Date-Time

getYear

Returns the year from a given date.

getYear (2011/09/07) = 2011

Date, Date-Time, Month-Year, Current Date

getMonth

Returns the number of the month for a given date.

getMonth (2011/09/07) = 9

Date, Date-Time, Month-Year, Current Date

getDay

Returns the day of the month for a given date.

getDay (1990/08/07) = 7

Date, Date-Time, Current Date

getDefaultDayOfWeek

Returns the number of the day of the week for a given date (Sunday = 1, Monday = 2, etc.).

getDayOfWeek (2011/09/09) = 6

Date, Date-Time, Current Date

getCustomDayOfWeek

Returns the number of the day of the week for a given date, based on a custom setting that defines the start of the week (e.g., if you set the week to start on Monday, Monday = 1).

getCustomDayOfWeek(2025/10/6) = 1

Date, Date-Time, Current Date

Age

Returns the age in years from the selected date as of the current date. If the selected Date field is left blank, or if the selected date is a future date relative to the current date, the Age will be taken as 0. When calculating age, the months completed are not returned. For example, if the age calculated is 19 years and 7 months, only 19 years is returned.

Age (1998/06/30) = 27

Date, Date-Time


Decimal Functions

Function

Role

Example

Supported Field Types

RoundUp

Rounds off the decimal number to the next integer, away from zero.

RoundUp (67.8) = 68

Decimal, Currency, Formula

RoundDown

Rounds off the decimal number to that of the previous integer.

RoundDown (55.7) = 55

Decimal, Currency, Formula

Round

Rounds off a decimal number to that of the next number when the decimal
value is .5 or above, and to the previous number when the decimal value is below .5

Round (12.6) = 13

Decimal, Currency, Formula

 

Time Functions

Function

Role

Example

Supported Field Types

HourDiff

Returns the hour difference between two time values.

HourDiff (12:40 PM - 09:10 AM) = 3

Time, Date-Time

MinutesDiff

Returns the minute difference between two time values.

MinutesDiff (10:30 AM - 8:10 AM) = 140

Time, Date-Time

getTimeDiff

Returns the difference between two time values in hours and minutes as a numeric value.

getTimeDiff (14:30 AM - 12:00 PM) = 2.5

Time, Date-Time

getMinutes

Returns the minutes from a given time value.

getMinute (2011/80/07 10:35 PM) = 35

Time, Date-Time

getHour12

Returns the hour from a given time value in a 12-hour format.

getHour12 (2011/08/07 10:35 PM) = 10

Time, Date-Time

getHour24

Returns the hour from a given time value in a 24-hour format.

getHour24 (2011/8/7 10:35 PM) = 22

Time, Date-Time

 

Choice Functions

Function

Role

Example

Supported Field Types

SelectionCount

Returns the number of options selected in the supported choice based field types. If a choice field (supported field) in Subform is used within the formula, this function returns the sum of all choices selected.

If 'Preferred Communication' (Checkbox) has options 'Email', 'SMS', 'WhatsApp', and 'Email' and 'SMS' are selected: SelectionCount(Preferred Communication) = 2

Multiple Choice, Checkbox, Image Choices (not supported in Subform)

MinChoiceVal

Returns the minimum value of the selected choice list.

If 'Plan_Selection' (Image Choice) has options 'Basic Plan' = 10, 'Standard Plan' = 50, 'Premium Plan' = 100, and 'Basic Plan' and 'Premium Plan' are selected: MinChoiceVal(Plan_Selection) = 10

Multiple Choice, Checkbox, Image Choice

MaxChoiceVal

Returns the maximum value of the selected choice list.

If 'Plan_Selection' (Image Choice) has options 'Basic Plan' = 10, 'Standard Plan' = 50, 'Premium Plan' = 100, and 'Basic Plan' and 'Premium Plan' are selected: MaxChoiceVal(Plan_Selection) = 100

Multiple Choice, Checkbox, Image Choice

 

Mathematical Functions

Function

Role

Example

Supported Field Types

Power

Returns the value of the first numeric value raised to the power of the second.

Power(2,3) = 8

Number, Decimal, Currency, Formula, Image Choice, Dropdown, Radio, Checkbox, Multiple Choice, Rating, Slider

Abs

Returns the absolute value (number without sign) of a numeric value.

Abs(-10) = 10

Number, Decimal, Currency, Formula, Image Choice, Dropdown, Radio, Checkbox, Multiple Choice

Square

Returns the square of the specified numeric value.

Square(10) = 100

Number, Decimal, Currency, Formula, Image Choice, Dropdown, Radio, Checkbox, Multiple Choice, Rating, Slider

Sqrt

Returns the square root of the specified numeric value.

Sqrt(16) = 4

Number, Decimal, Currency, Formula, Image Choice, Dropdown, Radio, Checkbox, Multiple Choice, Rating, Slider

Quotient

Returns the integer portion of a division.

Quotient(10, 3) = 3

Number, Decimal, Currency, Formula, Image Choice, Dropdown, Radio, Checkbox, Multiple Choice, Rating, Slider

Mod

Returns the remainder of the first numeric value divided by the second.

Mod(10,3) = 1

Number, Decimal, Currency, Formula, Image Choice, Dropdown, Radio, Checkbox, Multiple Choice, Rating, Slider.

 

System Field

Field

Role

Example

Supported Field Types

CurrentDate

This system field is used to return the difference between the current date and the selected date in the DayDiff, MonthDiff, and YearDiff functions.

Consider CurrentDate as 2025/11/4.

DayDiff(CurrentDate-2025/11/4) = 4

 

Date, Date-Time