For the complete documentation index, see llms.txt. This page is also available as Markdown.

Numeric

1. NUMBER

Converts a string representing a number into a decimal number.

NUMBER(parameter)

Replace parameter with a string you need to convert to decimal.

NUMBER({Opportunity.Unique_ID__c}) returns decimal value of Unique_ID field, e.g if Unique_ID = '1234' function will return 1234.0.

2. INTNUMBER

Converts a string representing a number into an integer.

INTNUMBER(parameter)

Replace parameter with a string you need to convert to integer.

INTNUMBER({Opportunity.Unique_Value__c}) returns integer value of Unique_Value field, e.g for Unique_Value__с = '1234.32' it will return 1234.

3. SUM

Returns integer or decimal value representing a sum of numeric parameters.

SUM(list_of_values OR value1, value2, ...)

Replace list_of_values argument with the list of numeric values (or pass numeric values as value1, value2', etc). arguments.

You can also pass combination of arrays and separate numeric arguments.

Let March Amount = 5.5, April Amount = 10 and May Amount = 15.

SUM({Stub__c.March_Amount__c}, {Stub__c.April_Amount__c}, {Stub__c.May_Amount__c}) will return 30.5.

Let String field stores following value: '8, 8, 10, 12'.

SUM(SPLIT({Stub__c.String__c}, ',')) will return 48.

Let March Amount = 5.5, April Amount = 10, May Amount = 15 and String = '8, 8, 10, 12'.

SUM({Stub__c.March_Amount__c}, {Stub__c.April_Amount__c}, {Stub__c.May_Amount__c}, SPLIT({Stub__c.String__c}, ',')) will return 78.5 (30.5 + 48).

4. SUB

Returns integer or decimal value representing result of sequential subtraction.

SUB(list_of_values OR value1, value2, ...)

Replace list_of_values argument with the list of numeric values (or pass numeric values as value1, value2, etc. arguments).

You can also pass combination of arrays and separate numeric arguments - they will be subtracted first and then results will be subtracted.

Let March Amount = 5, April Amount = 10 and May Amount = 15.

SUB({Stub__c.March_Amount__c}, {Stub__c.April_Amount__c}, {Stub__c.May_Amount__c}) will return -20 (5 - 10 - 15).

Let String field stores following value: '8, 8, 10, 12'.

SUB(SPLIT({Stub__c.String__c}, ',')) will return -22 (8 - 8 - 10 - 12).

Let March Amount = 5, April Amount = 10, May Amount = 15 and String = '8, 8, 10, 12'.

SUM({Stub__c.March_Amount__c}, {Stub__c.April_Amount__c}, {Stub__c.May_Amount__c}, SPLIT({Stub__c.String__c}, ',')) will return 2 ( (5 - 10 - 15) - (8 - 8 - 10 - 12) ).

5. MULT

Returns integer or decimal value representing result of multiplication.

MULT(list_of_values OR value1, value2, ...)

Replace list_of_values argument with the list of numeric values (or pass numeric values as value1, value2, etc. arguments).

You can also pass combination of arrays and separate numeric arguments.

Let March Amount = 5, April Amount = 10 and May Amount = 15.

MULT({Stub__c.March_Amount__c}, {Stub__c.April_Amount__c}, {Stub__c.May_Amount__c}) will return 750.

Let String field stores following value: '8, 8, 10, 12'.

MULT(SPLIT({Stub__c.String__c}, ',')) will return 7680 (8 * 8 * 10 * 12).

Let March Amount = 5, April Amount = 10, May Amount = 15 and String =: '8, 8, 10, 12'.

MULT({Stub__c.March_Amount__c}, {Stub__c.April_Amount__c}, {Stub__c.May_Amount__c}, SPLIT({Stub__c.String__c}, ',')) will return 5760000 (750 * 7680).

6. DIV

Returns integer or decimal value representing result of sequential dividing.

DIV(list_of_values OR value1, value2, ...)

Replace list_of_values argument with the list of numeric values (or pass numeric values as value1, value2, etc. arguments).

You can also pass combination of arrays and separate numeric arguments - they will be divided first and then results will be divided.

Let x = 450, y = 10 and z = 15.

DIV({Stub__c.x}, {Stub__c.y}, {Stub__c.z}) will return 3 (450 / 10 / 15).

Let String field stores following value: '1200, 2, 10, 12'.

DIV(SPLIT({Stub__c.String__c}, ',')) will return 5 (1200 / 2 / 10 / 12).

Let String field stores following value: '["24", "2", "3"]' and Area field stores '["6", "3"]'.

DIV(JPARSE({Stub__c.String__c}), JPARSE({Stub__c.Area__c})) will return 2 ( (24 / 2 / 3) / (6 / 3) ).

7. SQRT

Returns the positive square root of a given number.

SQRT(parameter)

Replace parameter with the field or expression you want computed into a square root.

SQRT(26.5) returns 5.1478150704935.

8. ABS

Calculates the absolute value of a number (a number without its positive or negative sign).

ABS(parameter)

Replace parameter with a field or numeric value that has the sign you want removed.

ABS({Department__c.Expected_Revenue__c}) calculates the positive value of the Expected Revenue amount regardless of whether it is positive or negative.

9. LOG

Returns the base 10 logarithm of a number.

LOG(parameter)

Replace parameter with the field or expression from which you want the base 10 logarithm calculated.

Let {$Variables.Concentration} = 10^-6.

LOG({$Variables.Concentration}) will return -6.

10. POW

Returns one value (x) raised to the power of another value (y), i.e. x^y.

POW(parameter, exponent)

Replace parameter argument with integer or double value that needs to be raised to the power of exponent argument.

POW (8, 3) will return 512.

POW (1000, -1/3) will return 0.1.

11. MOD

Returns a remainder after a number is divided by a specified divisor.

MOD(parameter1, parameter2)

Replace:

parameter1 with the field or expression you want to be divided;

parameter2 with the number to use as the divisor.

MOD(123, 100) will return 23.

12. MIN

Returns the lowest number from several numeric values.

MIN(list_of_values OR value1, value2, ...)

Replace list_of_values argument with the list of numeric values (or pass numeric values as value1, value2, etc. arguments).

You can also pass combination of arrays and separate numeric arguments.

Let String field stores following value: '["12", "2", "3"]' and Area field stores '["6", "3"]'.

MIN(JPARSE({Stub__c.String__c}), JPARSE({Stub__c.Area__c})) will return 2.

13. MAX

Returns the highest number from several numeric values.

MAX(list_of_values OR value1, value2, ...)

Replace list_of_values argument with the list of numeric values (or pass numeric values as value1, value2, etc. arguments).

You can also pass combination of arrays and separate numeric arguments.

Let String field stores following value: '["12", "2", "3"]' and Area field stores '["6", "3"]'.

MAX(JPARSE({Stub__c.String__c}), JPARSE({Stub__c.Area__c}), 9, 13) will return 13.

14. ROUND

Returns the rounded approximation of a decimal value.

ROUND(decimal_value, CEILING|DOWN|FLOOR|UP|HALF_DOWN|HALF_UP)

Replace decimal_value with the decimal to be rounded, and pass one of the allowed rounding modes (CEILING, FLOOR, DOWN, UP, HALF_DOWN, HALF_UP).

ROUND(122.3456669, 'CEILING') will return 123 ROUND(-122.3456669, 'CEILING') will return -122

ROUND(122.3456669, 'FLOOR') will return 122 ROUND(-122.3456669, 'FLOOR') will return -123

ROUND(122.3456669, 'DOWN') will return 122 ROUND(-122.3456669, 'DOWN') will return -122

ROUND(122.3456669, 'UP') will return 123 ROUND(-122.3456669, 'UP') will return -123

ROUND(122.5, 'HALF_DOWN') will return 122 ROUND(-122.5, 'HALF_DOWN') will return -122

ROUND(122.5, 'HALF_UP') will return 123 ROUND(-122.5, 'HALF_UP') will return -123

15. SCALE

Returns the decimal scaled to the specified number of decimal places.

SCALE(decimal_value, decimal_places)

Replace:

decimal_value with decimal value you want scaled;

decimal_places with number of decimal places to be left.

Let Salary value = 122.3456669.

SCALE({User.Salary__c}, 2) will return 122.35.

Let Number value = 25.

SCALE({Stub__c.Number__c}, 3) will return 25.000.

16. RANDOM

Generates a random 19-digit number (positive or negative; negative number will also have a sign).

RANDOM()

This function doesn't require parameters.

RANDOM() will return a random 19-digit number like 2139744657709176245 or -6535028942888403203.

17. FORMATNUMBER

Formats the decimal value to make it have readable view (adds thousands separators and removes leading zeroes).

FORMATNUMBER(decimal_value)

Replace decimal_value with decimal value you want to be formatted.

FORMATNUMBER(-01233534343453.566) will return -1,233,534,343,453.566.

Last updated