Calculations

Calculation triggers

Auto-calculated

Calculated default value

Manual calculation

Formulas

App Data

Table / Objects Get the values from a sub-object type. For exemple, get a series of value from the content of a table.
Nested Sub-Record / Links Get one of the value from one of the sub-object. For exemple, get a single value from a link or a panel.
Field Get the value from a data type in the same object.
Internal Field (DB ID) Get the internal DB ID from a data type in the same object.
Meta Field Get the value from a meta field in the object.
Back links Use the value from records linking to this record.
Parent Record Get the parent record object to select a value within it.

Static

Value Set a static value in your formula.
Now Returns the date and time at the instant of the function call on the server in ISO 8601 format, UTC (Z)
Today Returns the date at the instant of the function call on the server in ISO 8601 format, UTC (Z)
Random Returns a random number between 0 and 1.
Random Integer Return a random integer between the max and min numbers provided. Default max = 100 and min = 0.

Logics

Either Checks if either value within the array is truthy.
All true Checks if all the values within the array are truthy.
Equal Value Checks if the values are equal
Equal Object Checks if the objects or arrays are the same
Has Value? If the value contains something, returns a boolean true, otherwise false.
Trigger Triggers any calculation based on trigger fields that are not taken into account in the calculation. First field is the calculation, all the following arguments are triggers and their change will trigger a re-calculation.
if…then…else If a condition is true (truthy), then returns the true value else returns the false value. (Caution, both expressions are evaluated, keep calculations levels simple and low)

Text

Concatenate Concatenates all the text in one text.
Join Join all the texts from a series of elements using a separator (for example, it could be “, “).
Text Length Returns the length of the text provided.
Sentiment Score (English) Provide a sentiment score based on AFINN-165 english language word list.
Sentiment Score (French) Provide a sentiment score based on AFINN word list translated in French.
Text preview Generates a preview of a text by cutting it and limiting the text to full sentences
Is URL? Checks if the value is a url with http:// or https://.
Levenshtein distance Calculates Levenshtein distance between two text strings. http://en.wikipedia.org/wiki/Levenshtein_distance
Capitalize Converts first letter of the text to uppercase.
Decapitalize Converts first letter of the text to lowercase.
Chop text Chops the text in equal sections
Clean text Trim and replace multiple spaces with a single space.
Clean diacritics Replace diacritic characters with closest ASCII equivalents. (ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșşšŝťțţŭùúüűûñÿýçżźž are supported)
Chars from text string Chops the text string into an array of individual characters.
Swap case Returns a copy of the text in which all the case-based characters have had their case swapped.
Text includes? Tests if text contains a specific text (substring).
Count chars in text Returns number of occurrences of substring in text.
Escape HTML Converts HTML special characters to their entity equivalents. This function supports cent, yen, euro, pound, lt, gt, copy, reg, quote, amp, apos.
Unescape HTML Converts entity characters to HTML equivalents. This function supports cent, yen, euro, pound, lt, gt, copy, reg, quote, amp, apos, nbsp.
Insert in a text Insert a text within another text.
Replace all occurences in Text Replaces all the occurence of a text in another text by a replacement text.
Is Blank text? Checks if the text is blank (empty text).
Split lines Split lines to an array
Reverse text Return reversed text: “hello” -> “olleh”.
Dedent Dedent unnecessary indentation or dedent by a pattern.
Splice text Adds/removes letters to/from the text.
Text starts with Checks whether the text begins with a text.
Text ends with Checks whether the text ends with a text.
Predecessor Returns the predecessor text to a text. (B -> A)
Successor Returns the successor text to a text
Titleize Capitalize the first letter of each word.
Camelize Converts underscored or dasherized text to a camelized one. Begins with a lower case letter unless it starts with an underscore, dash or an upper case letter.
Classify text Converts text to camelized class name (same as in coding standard for object-oriented languages). First letter is always upper case
Underscored Converts a camelized or dasherized text into an underscored one
Dasherize Converts a underscored or camelized text into an dasherized one
Humanize Converts an underscored, camelized, or dasherized text into a humanized one. Also removes beginning and ending whitespace, and removes the postfix ‘_id’.
Trim Trims defined characters from begining and ending of the text. Defaults to whitespace characters.
Left Trim Left trim. Similar to trim, but only for left side.
Right Trim Right trim. Similar to trim, but only for right side.
Truncate Truncate a text after a given number of character, if necessary. Optionally, give a special text to add to the end instead of the text that was remove (”…” for exemple)
Words Split text by delimiter (String or RegExp), /\s+/ by default.
sprintf C like text formatting. sprintf("%.1f", 1.17)
Pad text pads the text with characters until the total text length is equal to the passed length parameter. By default, pads on the left with the space character (" “). the padding text is truncated to a single character if necessary.
Left Pad text Same as pad but on the left only.
Right Pad text Same as pad but on the right only.
Left Right pad text Same as pad but both sides at once.
To number Parses a text to return a number. Returns NaN if the text cannot be parsed to a number.
Search right Searches a text from left to right for a pattern and returns a subtext consisting of the characters in the string that are to the right of the pattern or all string if no match found.
Search Back Right Searches a text from right to left for a pattern and returns a subtext consisting of the characters in the string that are to the right of the pattern or all string if no match found.
Search left Searches a text from left to right for a pattern and returns a subtext consisting of the characters in the string that are to the left of the pattern or all string if no match found.
Search Back Left Searches a text from right to left for a pattern and returns a subtext consisting of the characters in the string that are to the left of the pattern or all string if no match found.
Strip HTML tags Removes all html tags from text.
Array To Sentence Join an array into a human readable sentence. ([“Apples”, “Oranges” and “Bananas”] => “Apples, Oranges and Bananas”)
Array To Serial Sentence Join an array into a human readable sentence, using the serial comma. ([“Apples”, “Oranges” and “Bananas”] => “Apples, Oranges, and Bananas”)
Repeat Repeats a text count times.
Surround Surround a text with another text.
Quotes Quotes a text. defaults to using “.
Unquotes Unquotes a text.
Slugify Transform text into an ASCII slug which can be used in safely in URLs. Replaces whitespaces, accentuated, and special characters with a dash. Limited set of non-ASCII characters are transformed to similar versions in the ASCII character set such as ä -> a. (Caution: this function is charset dependent)
Natural order comparison Naturally order comparision helps to sort text like humans would do. Numbers are not compared by their ASCII values but by their actual value. Note: this means “a” > “A”. Transform to lower case first if this isn’t to be desired.
To boolean Turn strings that can be commonly considered as booleas to real booleans. Such as “true”, “false”, “1” and “0”. This function is case insensitive.
Upper case Transforms a text to all upper case
Lower case Transforms a text to all lower case
Split text Splits a text to an array using the provided splitter character
Replace text Replace a value or pattern (regexp) in the text with another value. The value is replaced only once while a pattern is replaced through the entire text.
Slice text Slices text from a begining index to the end of the text or to an optional end index.
Proper Case Synonym for Titleize. Named as such to please Excel users.
Repts Synonym for Repeat. Named as such to please Excel users.
Substring Return a part of the text from a begining index to the end of the text or to an optional end index. If the start is more than the end, it swaps numbers.
Substring from Start Return a part of the text from 0 to the ending index provided.
Substring to the end Return a part of the text from the starting index to the end of the string.
Substring from end Returns a part of the text from an index that is counted from the end of the text, to the end.
Regular Expression Generates a regular expression object based on the regexp string. Useful for search and replace on advanced use cases.
More than Checks if the first value is more than the second value.
More than or equal to Checks if the first value is more or equal than the second value.
Less than or equal to Checks if the first value is less or equal than the second value.
Less than Checks if the first value is less than the second value.
Between Checks if the second value is between the first and third values.
Between Checks if the second value is between the first and third values, including either value.
Has Value? If the value contains something, returns a boolean true, otherwise false.

Dates

Is Date? Checks if the value is a date (ISO 8601 format)
Is Date & time? Checks if the value is a date with time (ISO 8601 format)
Now Returns the date and time at the instant of the function call on the server in ISO 8601 format, UTC (Z)
Duration From Dates Calculates the duration between two ISO 8601 (“YYYY-MM-DDTHH:mm:ssZ”) dates strings. Returns the ISO 8601 duration representation (“PT30M”)
Make Event Builds an ISO 8601 event from a start date and end date
Make Event (Start date) Builds an ISO 8601 event from a start date and a duration
Make Event (End date) Builds an ISO 8601 event from a end date and a duration
Make date-time Builds an ISO 8601 date time string from a date and a time
Date only Builds an ISO 8601 date (“YYYY-MM-DD”) from an ISO 8601 date (“YYYY-MM-DDTHH:mm:ssZ”)
Make date (from custom format) Builds an ISO 8601 date time string from a string of text and a format (based on https://momentjs.com/docs/#/displaying/format/)
Start date from a Calendar Event Extract the start date (ISO 8601 format) from an event input into a calendar (containing start date, end date and duration)
End date from a Calendar Event Extract the end date (ISO 8601 format) from an event input into a calendar (containing start date, end date and duration)
Duration from a Calendar Event Extract the duration date (ISO 8601 format) from an event input into a calendar (containing start date, end date and duration)
Duration to Decimal Hours Transforms a standard duration (ISO 8601) into a decimal number representing the number of hours and any subsquent 100th of an hour.
Today Returns the date at the instant of the function call on the server in ISO 8601 format, UTC (Z)
Add to date Add a duration to a date (ISO 8601 format for both)
Subtract from date Subtract a duration to a date (ISO 8601 format for both)
Start of year Calculates the start of the year from a given date (ISO 8601 format)
End of year Calculates the end of the year from a given date (ISO 8601 format)
Start of month Calculates the start of the month from a given date (ISO 8601 format)
End of month Calculates the end of the month from a given date (ISO 8601 format)
Start of quarter Calculates the start of the quarter from a given date (ISO 8601 format)
End of quarter Calculates the start of the quarter from a given date (ISO 8601 format)
Start of week Calculates the start of the week from a given date (ISO 8601 format)
End of week Calculates the end of the week from a given date (ISO 8601 format)
Start of day Calculates the start of the day from a given date (ISO 8601 format)
End of day Calculates the end of the day from a given date (ISO 8601 format)
Start of hour Calculates the start of the hour from a given date (ISO 8601 format)
End of hour Calculates the end of the hour from a given date (ISO 8601 format)
Start of minute Calculates the start of the minute from a given date (ISO 8601 format)
End of minute Calculates the end of the minute from a given date (ISO 8601 format)
Start of second Calculates the start of the second from a given date (ISO 8601 format)
End of second Calculates the end of the second from a given date (ISO 8601 format)

Geographical

Address Search Provides with search information from the address provided in a text format.
Address Coordinates Search for the most likely coordinates for an address provided in text form
Address Annotations Search for the most likely coordinates for an address provided in text form. This returns an object containing DMS, MGRS, Maidenhead, Mercator, OSM UN_M49, phone calling code, currency, flag (emoji code), geohash, quibla, roadinfo, sunrise, sunset, timezone, what3words.
DMS from Address Get the most likely latitude and longitude from an address (lat/lng), in the DMS format.
MGRS from Address Get the most likely Military Grid Reference System (MGRS) from an address.
Maidenhead from Address Get the most likely Maidenhead Locator System (QTH, IARU) from an address.
Mercator from Address Get the most likely Mercator projection references from an address.
OSM links from Address Get links for the most likely location for an address, on the Open Street Map site. Two links are provided. One to consult the map and one to submit correction suggestions.
OSM note link from Address Get the most likely page for an address on the Open Street Map site, in order to enter a correction suggestion.
OSM link from Address Get the most likely location for an address on the Open Street Map site.
UN M49 from Address Returns a data object with United Nations M49 informations on the most likely location for the address provided
UN M49 Regions from Address Returns a data object with United Nations M49 region informations on the most likely location for the address provided.
UN M49 Statistical Grouping from Address Returns an array of statistical grouping from an address. (Codes from https://blog.opencagedata.com/post/new-annotation-UN-M49-statistical-codes.) - LDC Least Developed Country, LEDC Less Economically Developed Country, LLDC Landlocked Developing Country, MEDC More Economically Developed Country, SIDS Small Island Developing State
Phone code from Address Returns the phone code for the most likely address.
Currency info from Address Returns informations on the currency for the most likely address.
Currency alternate symbols from Address Return alternate symbols for currencies at an Address
Currency decimal mark from address Returns the standard decimal mark used for currencies at an address
Currency html entity from address Returns the html entity for the currency at the provided address
Currency ISO code from address Returns the currency ISO code for the currency at the provided address
Currency numeric ISO code from address Returns the currency numeric ISO code at the provided address
Currency name from address Returns the currency name from the provided address
Smallest currency denomination from address Returns the smallest currency denomination at the provided address
Currency subunit from address Returns the currency sub-unit (cents) name at the provided address
Multipiler currency subunit to unit from address Returns the multiplier between the currency unit and currency sub-unit at the provided address
Currency unicode from Address Returns the unicode character code for the currency at the provided address
Currency symbol position from address Returns 0 if the currency symbol is before the value or 1 if the currency symbol is after the value for the currency at the provided address.
Currency thousands separator form address Returns the character used for separating the thousands for the currency at the provided address.
Unicode Emoticon Flag code from address Returns the unicode character code for the flag corresponding to the provided address.
Geohash from address Returns the geoash (geocode system) for the provided address.
Quibla from address Returns the quibla (Decimal degrees clockwise from true north to turn to point to the Kaaba) for the provided address. (Calculated using the great circle method).
Road info from address Returns an object containing road information from the provided address.
Road side information from address Returns the side of the road on which vehicles drive for the provided address. (left/right, in english)
Speed unit from address Returns the speed unit (km/h, mph), at the provided address.
Sun set/rise info from address Returns an object with sunset and sunrise information from the provided address.
Sunrise info from address Returns sunrise informations from the provided address. (apparent, astronomical, civil and nautical sunrise information are included in an object)
Apparent sunrise info from address Returns apparent sunrise informations from the provided address. (what is typically reported as sunrise/set)
Astronomical sunrise info from address Returns astronomical sunrise informations from the provided address. (sky is completely dark/light)
Civil sunrise info from address Returns civil sunrise informations from the provided address. (a person can read / no longer read)
Nautical sunrise info from address Returns nautical sunrise informations from the provided address. (navigation using a sea horizon possible/no longer possible)
Sunset info from address Returns sunset informations from the provided address. (apparent, astronomical, civil and nautical sunset information are included in an object)
Sunset info from address Returns sunset informations from the provided address. (apparent, astronomical, civil and nautical sunset information are included in an object)
Apparent sunset info from address Returns apparent sunset informations from the provided address. (what is typically reported as sunrise/set)
Astronomical sunset info from address Returns astronomical sunset informations from the provided address. (sky is completely dark/light)
Civil sunset info from address Returns civil sunset informations from the provided address. (a person can read / no longer read)
Nautical sunset info from address Returns nautical sunset informations from the provided address. (navigation using a sea horizon possible/no longer possible)
Timezone info from address Returns the following information on the time zone at the provided address. (name, now_in_dst, offset_sec, offset_string, short_name)
Timezone name from address Returns the timezone name information at the provided address.
DST from address Returns the current timezone DST information (Daylight Saving Time) at the provided address.
Time offset seconds from address Returns the timezone offset in seconds at the provided address.
Time offset from address Returns the timezone offset at the provided address in a text format ("+0200”)
Timezone short name from address Returns the timezone short name from the provided address
What3Words (english) from address Returns the 3 words address from the provided address. The 3 words are based on the english version of their system. https://what3words.com/
Location components from address Returns an object with data about the address, including components such as ISO_3166-1, continent, country, county, local_administrative_area, political_union, postcode, and state.
ISO_3166-1 alpha-2 from address Returns the ISO_3166-1 alpha-2 country code from the provided address.
ISO_3166-1 alpha-3 from address Returns the ISO_3166-1 alpha-3 country code from the provided address.
Continent from address Returns the most likely continent from the provided address
Country from address Returns the most likely country from the provided address
Country code from address Returns the most likely country code from the provided address
County from address Returns the most likely county name from the provided address
Admin Area from address Returns the most likely Local Administrative Area from the provided address
Political Union from address Returns the most likely Political Union area name from the provided address
Postcode from address Returns the most likely Postcode from the provided address
State name from address Return the most likely State name from the provided address
Formated Address from Address Returns a formated and validated address version from a search address. This is based on OSM data.
Lat/Lng from address Returns the most likely lat/lng object of decimal coordinates corresponding to the address provided.

Numbers

Is a Number? Checks if the value is a number.
Round Rounds up the number to the precision provided. The precision is the maximum number of significant digits after the whole separator
Ceiling Rounds a number up to the nearest upper integer.
Floor Rounds a number down to the nearest lower integer
Modulo Calculates the modulo from a number
Average Averages all the elements and provides a unique value.
Sum Sums up all the elements and provides a unique value.
Subtract Subtracts all the elements in order, from the first element.
Multiply Multiplies up all the elements and provides a unique value.
Divide Divides all the elements in order, from the first element.
Power Brings the base value to the power of the exponent (b^e).
Absolute Returns the absolute value of the number
Min Returns the lowest element in value.
Max Returns the highest element in value.
More than Checks if the first value is more than the second value.
More than or equal to Checks if the first value is more or equal than the second value.
Less than or equal to Checks if the first value is less or equal than the second value.
Less than Checks if the first value is less than the second value.
Between Checks if the second value is between the first and third values.
Between Checks if the second value is between the first and third values, including either value.
Percentage Calculates the percentage of a value with the percentage expressed as an integer 0-100+.
Add tax % to a value Add the corresponding % tax to the value. value=10 at percent=20 tax will give the value of 12. This works with any number value. It increases the value by the percentage.
Progress in percent Calculates the percentage progress from a value and a target value. 1 out of a target of 2 is 50%. The value returned is a number (no % sign). The value can be more than 100.
Cross-multiply Performs a cross multiplication to find the missing input such as a/b = c/d. If a is missing, returns a, if b is missing, returns b, etc. Only one variable can be missing otherwise the function returns null.
Random Returns a random number between 0 and 1.
Random Integer Return a random integer between the max and min numbers provided. Default max = 100 and min = 0.
Formats numbers Formats numbers to be presented as text. (123456789.123, 5, “.”, “,") => “123,456,789.12300”
Equal Value Checks if the values are equal
Has Value? If the value contains something, returns a boolean true, otherwise false.

Financial

Currency info from Address Returns informations on the currency for the most likely address.
Currency alternate symbols from Address Return alternate symbols for currencies at an Address
Currency decimal mark from address Returns the standard decimal mark used for currencies at an address
Currency html entity from address Returns the html entity for the currency at the provided address
Currency ISO code from address Returns the currency ISO code for the currency at the provided address
Currency numeric ISO code from address Returns the currency numeric ISO code at the provided address
Currency name from address Returns the currency name from the provided address
Smallest currency denomination from address Returns the smallest currency denomination at the provided address
Currency subunit from address Returns the currency sub-unit (cents) name at the provided address
Multipiler currency subunit to unit from address Returns the multiplier between the currency unit and currency sub-unit at the provided address
Currency unicode from Address Returns the unicode character code for the currency at the provided address
Currency symbol position from address Returns 0 if the currency symbol is before the value or 1 if the currency symbol is after the value for the currency at the provided address.
Currency thousands separator form address Returns the character used for separating the thousands for the currency at the provided address.
Round Rounds up the number to the precision provided. The precision is the maximum number of significant digits after the whole separator
Ceiling Rounds a number up to the nearest upper integer.
Floor Rounds a number down to the nearest lower integer
Average Averages all the elements and provides a unique value.
Sum Sums up all the elements and provides a unique value.
Subtract Subtracts all the elements in order, from the first element.
Multiply Multiplies up all the elements and provides a unique value.
Divide Divides all the elements in order, from the first element.
More than Checks if the first value is more than the second value.
More than or equal to Checks if the first value is more or equal than the second value.
Less than or equal to Checks if the first value is less or equal than the second value.
Less than Checks if the first value is less than the second value.
Between Checks if the second value is between the first and third values.
Percentage Calculates the percentage of a value with the percentage expressed as an integer 0-100+.
Add tax % to a value Add the corresponding % tax to the value. value=10 at percent=20 tax will give the value of 12. This works with any number value. It increases the value by the percentage.
Progress in percent Calculates the percentage progress from a value and a target value. 1 out of a target of 2 is 50%. The value returned is a number (no % sign). The value can be more than 100.
Payment (PMT) Payment calculation function based on Excel’s PMT function. Used to calculate the payment for a loan that has constant payments and a constant interest rate. Parameters include: The interest rate for the loan. The total number of payments for the loan. The present value, or the total amount that a series of future payments is worth now; also known as the principal. The future value, or a cash balance you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (zero), that is, the future value of a loan is 0. Type: The number 0 (zero) or 1 and indicates when payments are due (start of the period or end of the period).

Boolean

To boolean Turn strings that can be commonly considered as booleas to real booleans. Such as “true”, “false”, “1” and “0”. This function is case insensitive.
Boolean Not Reverses the value of a boolean value. True becomes false and false becomes true.
Either Checks if either value within the array is truthy.
All true Checks if all the values within the array are truthy.

Array

Is an Array? Checks if the value is an array
Reverse Returns a reversed array
Sort Sort an array. “desc”, -1, “d” or “>” indicate descending order (Z-A, 99-0), otherwise the order is ascending (A-Z, 0-99)
Sort Object Sort an array of objects by a field. “desc”, -1, “d” or “>” indicate descending order (Z-A, 99-0), otherwise the order is ascending (A-Z, 0-99)
Contains value Checks if the array contains the specified value.
Last item Returns the last item of the array
First item Returns the first item of the array
Nth item return the nth item of the array. n being the number provided in the index.
Array Length Returns the length of the array provided.
Ensure array If the input is an array, returns the same value. If the input empty or null or undefined, it returns an empty array. Otherwise, it returns the value provided, wrapped in an array.
Count Counts the number of items in an array (length of array) or the number of characters in a text or the number of keys in an object or the number of symbols in a number.
Compact array Remove blank and falsy values from the array.
Flatten array Brings all the elements in nested array at the same level, makes one array of values.
Array size Returns the array size. Works only on arrays
Deduplicate Values Returns an array with all the duplicate values in the array removed. All values are unique in the array.
Either Checks if either value within the array is truthy.
All true Checks if all the values within the array are truthy.
Equal Object Checks if the objects or arrays are the same
Natural Sort Natural Sort of an array. “desc”, -1, “d” or “>” indicate descending order (Z-A, 99-0), otherwise the order is ascending (A-Z, 0-99)
Natural Sort Object Natural Sort of an array of objects by a field. “desc”, -1, “d” or “>” indicate descending order (Z-A, 99-0), otherwise the order is ascending (A-Z, 0-99)

Object

Count Counts the number of items in an array (length of array) or the number of characters in a text or the number of keys in an object or the number of symbols in a number.
Is object? Checks if the value is an object (javascript/JSON object)
Get Field Get the value of a field from an object. This fonction allows getting sub-fields from inner objects, separated by the ‘.’ notation.
Set Field Set the value of a field in an object. This fonction allows setting sub-fields from inner objects, separated by the ‘.’ notation.
Has Field Checks if a field exists in an object. This fonction allows accessing sub-fields from inner objects, separated by the ‘.’ notation.
Stringify JSON Créates a string of text representing the JSON data.
Equal Object Checks if the objects or arrays are the same

Need more?

We are happy to add any calculation formula to the platform as long as they can benefit more than one user. (We try to avoid over-customizing formula). Please contact us to integrate more calculation capabilities to the platform : [email protected]