functionAll Functions

Single-page reference. Functions are grouped by the same categories as the existing subpages.

circle-info

FlexiKanban provides a rich library of built-in functions that can be used inside formulas and expressions throughout the application. These functions allow administrators to dynamically manipulate data, evaluate conditions, and build advanced logic without writing Apex code. Functions can be used in Kanban dashboards, forms, actions, filters, and styling configurations.

SObject Functions


SOBJECTTYPE

Returns the API name of an object

SOBJECTTYPE(id)

Replace id with the id of an object.

SOBJECTDESCRIBE

Retrieves metadata for an object. Returns object (JSON).

SOBJECTDESCRIBE(object_api_name)

Replace object_api_name with the API name of an object.

SOBJECTFIELDDESCRIBE

Retrieves metadata for an object field. Returns object (JSON)

SOBJECTFIELD(object_api_name, field_api_name)

Replace object_api_name with the API name of an object and field_api_name with an API name of a field to retrieve metadata for.

Text Functions


SPECIALSYMBOLS

Allows the use of special symbols within the formula.

Use any of the below expressions whenever you need a formula to contain special symbol(s):

{QUOTE} for single quote (') {DBL_QUOTE} for double quote (") {OPEN_BKT} for opening bracket (() {CLOSE_BKT} for closing bracket ()) {OPEN_SQR_BKT} for opening square bracket ([) {CLOSE_SQR_BKT} for closing square bracket (]) {TAB} for tabulation {BACK_SL} for backslash (\) {BR} for line break {RET} for carriage return

CONTAINS

Compares two arguments of text and returns true if the first argument contains the second argument. If not, returns false.

CONTAINS(source_string, search_string)

Replace source_string with the text that should be searched for a value of search_string.

STARTS

Determines whether a string begins with the characters of another string, returning true if it does. If not, returns false.

STARTS(source_string, search_string)

Replace source_string with the text that should be checked for starting from the value of search_string.

POS

Gets the position of a string within another string and returns it as a number.

POS(source_string, search_string)

Replace source_string with the field or expression you want to search and search_string with the string you want to find.

ENDS

Determines whether a string ends with the characters of another string, returning true if it does. If not, returns false.

ENDS(source_string, search_string)

Replace source_string with the text that should be checked for ending with the value of search_string.

SUBSTR

Returns a new String that begins with the character at the specified start position and extends until the character at end position.

SUBSTR(source_string, start_index, end_index)

Replace source_string with the string, field, or expression from which you want to get a substring, start_index with the position substring begins from, end_index the position substring ends at.

circle-exclamation

REPLACE

Replaces a sequence of characters in a string with another set of characters, and returns the resulting string.

REPLACE(source_string, from_string, to_string, regex_boolean_optional)

Replace source_string with a string to be changed, from_string with characters to be replaced in source_string, and to_string with the replacement set of characters.

A User can pass a regular expression as a from_string argument as well. In this case, the user should add true' as an optional regex_boolean_optional argument.

REMOVE

Removes one or more substrings from a source string.

REMOVE(source_string, string_parameter1, string_parameter2, ...)

Replace source_string with the text field or expression you want to remove substrings from and string_parameter1, string_parameter2, etc with substrings to be removed from the source string.

LEN

Returns the number of characters in a specified text string (string length).

LEN(string)

Replace string with the field or expression whose length you want to get.

SPLIT

Returns an array (a list) that contains each substring of the source string that is split on the given parameter. Substrings are placed in the array in the order in which they occur in the source string.

SPLIT(source_string, separator_string)

Replace source_string with the text field or expression to be split, and separator_string with a substring to split on.

JOIN

Joins the elements of an array into a single string separated by the specified separator.

JOIN(array, separator_string, left_string_optional, right_string_optional)

Replace array argument with an array you want to join to a string, separator_string with a string to insert between array elements. left_string_optional and right_string_optional arguments are optional and can be used to modify array elements (add some text leftside or rightside of each of them) before joining.

LOWER

Converts all of the characters in the string to lowercase.

LOWER(string)

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

UPPER

Converts all of the characters in the string to uppercase.

UPPER(string)

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

ESCAPE

Returns a string whose characters are escaped using the specified rule.

ESCAPE(string, JAVA|JSON|HTML|CSV|XML|UNICODE|QUOTE)

Replace string parameter with a string to be escaped and specify one of the allowed escape rules as the second argument.

ID

Converts a string to a Salesforce object ID.

ID(string)

Replace string argument with a value that should be treated as ID.

BR

Adds (line break) HTML tag when used.

Add BR() to other functions or output text values wherever you need a line break.

TEXT

Converts any data type into text.

TEXT(parameter)

Replace parameter with the field or expression you want to convert to text format.

BLOB

Casts the specified string to a Binary Large Object.

BLOB(string)

Replace string argument with a string you need to cast to BLOB

TOBASE64

Converts a BLOB to a Base64-encoded String representing its normal form.

TOBASE64(blob_parameter)

Replace blob_parameter with a BLOB content, you need to convert it to base64.

FROMBASE64

Converts a Base64-encoded string to a BLOB representing its normal form.

FROMBASE64(string_parameter)

Replace string_parater with Base64-encoded string.

TOHEX

Returns a hexadecimal (base 16) representation of the string.

TOHEX(string_parameter)

Replace string_parameter with a string you need to convert to hex.

FROMHEX

Converts the specified hexadecimal (base 16) value to a string.

FROMHEX(string_parameter)

Replace string_parameter with a hex string, you need to convert it to text.

URLENCODE

Encodes or decodes a string in application/x-www-form-urlencoded format using a specific encoding scheme.

URLENCODE(string_to_encode, format_optional, boolean_encode_optional)

Replace string_to_encode parameter with a string to be encoded (or decoded).

Optionally: provide a specific encoding scheme in format_optional argument (default is UTF-8), and pass false as a boolean_encode_optional argument if you need to decode a string.

TOTEXTDURATION

Сonverts integer amount of minutes (numeric value) into a string in the XXXh YYm or ZZZd XXh YYm format.

TOTEXTDURATION(integer_minutes_parameter, hours_in_day_optional)

Replace integer_minutes_parameter with an integer representing the number of minutes to get the duration in hours and minutes.

Optional hours_in_day_optional argument represents how many hours in a working day are set. Add it to get duration in working days, hours, and minutes.

FROMTEXTDURATION

Converts string in the XXXh YYm or ZZZd XXh YYm format to an integer representing the number of minutes. Returns a numeric value.

FROMTEXTDURATION(string_parameter, hours_in_day_optional)

Replace string_parameter with a string to be converted.

Add optional hours_in_day_optional argument to specify how many work hours one working day consists of.

MATCH

Searches a string for a match against a regular expression, and returns the matches in an array.

MATCH(regex_string, data_string)

Replace regex_string with a regular expression, and data_string with the string to compare to regex.

Logical Functions


ISBLANK

Analyzes the given expression and returns:

  • With one argument: a boolean value (true if the argument expression does not have a value (is empty or does not exist), otherwise returns false).

  • With 2 arguments: some expression evaluation result or the first argument value.

  • With 3 arguments: some expression evaluation result or some other expression evaluation result.

ISBLANK(parameter1) or ISBLANK(parameter1, if_true_parameter2) or ISBLANK(parameter1, if_true_parameter2, if_false_parameter3)

Replace:

parameter1 with a logical expression you want to evaluate;

if_true_parameter2 with the result you want to get when parameter1 returns true;

if_false_parameter3 with the result you want to get when parameter1 returns false.

NOT

Returns false for TRUE and true for FALSE (inverts the result of the logical expression).

NOT(parameter)

Replace parameter with a logical expression that you want to evaluate.

IF

Determines if the condition expression is true or false. Returns a given value if true and another value if false.

IF(condition, result_if_true, result_if_false)

Replace: condition with with the logical expression, result_if_true with the result you want to get if the condition is true, result_if_false with the result you want to get if the condition is false.

AND

Returns a boolean value: true if all parameter values are true, and false if one or more values are false.

AND(boolean_parameter1, boolean_parameter2, ...)

Replace boolean_parameter1, boolean_parameter2, etc with values or expressions that you want evaluated.

OR

Returns a boolean value: true if at least one parameter is true, and false if all parameters are false.

OR(boolean_parameter1, boolean_parameter2, ...)

Replace boolean_parameter1, boolean_parameter2, etc., with values or expressions you want evaluated.

CASE

Checks the given expression value against a series of case values. If the expression is equal to one of the case values, it returns the corresponding result.

CASE(value, case1, result1, case2, result2, ..., else_result)

Replace:

value with the field or value you want compared to each specified case;

each case (case1, case2, etc.) with the data/expression/field for comparison;

each result (result1, result2, etc.) with data/expression/field that must be returned for the proper case;

else_result with the data/expression/field that must be returned when the expression does not equal to any case.

IN

Returns a boolean (true or false) result depending on whether the checked value is present in the given list.

IN(value, list_of_values OR [value1, value2, ...])

Replace:

value with value you need to check in list;

list_of_values with the list to compare value parameter to (or pass list of values as separate parameters value1, value2, etc).

circle-info

You can also pass a combination of lists and separate values as parameters.

NOTIN

Returns a boolean (true or false) result depending on whether the checked value is NOT present in the given list.

NOTIN(value, list_of_values OR [value1, value2, ...])

Replace:

value with a value you need to check in the list;

list_of_values with the list to compare value parameter to (or pass a list of values as separate parameters value1, value2, etc).

circle-info

You can also pass a combination of lists and separate values as parameters.

INSTANCEOF

Validates if the specified value is an instance of a declared type. Returns a boolean result (true or false).

INSTANCEOF(value, Decimal|Boolean|String|Date|DateTime)

Replace value argument with a value you want to validate and pass one of the allowed types (Decimal, Boolean, String, Date or DateTime) as second argument.

Numeric


NUMBER

Converts a string representing a number into a decimal number.

NUMBER(parameter)

Replace parameter With a string, you need to convert it to a decimal.

circle-exclamation

INTNUMBER

Converts a string representing a number into an integer.

INTNUMBER(parameter)

Replace parameter with a string, you need to convert it to an integer.

circle-exclamation

SUM

Returns an 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.

circle-info

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

SUB

Returns an integer or decimal value representing the 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).

circle-info

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

MULT

Returns an integer or decimal value representing the 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).

circle-info

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

DIV

Returns an integer or decimal value representing the 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).

circle-info

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

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.

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.

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.

POW

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

POW(parameter, exponent)

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

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.

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).

circle-info

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

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).

circle-info

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

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).

SCALE

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

SCALE(decimal_value, decimal_places)

Replace:

decimal_value with the decimal value you want scaled;

decimal_places with a number of decimal places to be left.

RANDOM

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

RANDOM()

This function doesn't require parameters.

FORMATNUMBER

Formats the decimal value for readability (adds thousands separators and removes leading zeros).

FORMATNUMBER(decimal_value)

Replace decimal_value with the decimal value you want to be formatted.

Date and Time Functions


MINUTES

Converts a number into a minutes value.

MINUTES(parameter)

Replace parameter with the number value to convert it to minutes.

HOURS

Converts a number into an hours value.

HOURS(parameter)

Replace parameter with the number value to convert it to hours.

DATE

Returns a date value from year, month, and day values you enter.

DATE(year, month, day)

Replace:

year with a four-digit year;

month with a two-digit month;

day with a two-digit day.

DATETIME

Returns a date value from year, month, day, hours, minutes, and seconds values in the local time zone of the current user.

DATETIME(year, month, day, hours, minutes, seconds)

Replace parameters with integer values of year, month, day, hours, minutes, and seconds.

DATETIMEGMT

Returns a date value from year, month, day, hours, minutes, seconds in a GMT datetime value.

DATETIMEGMT(year, month, day, hours, minutes, seconds)

Replace parameters with integer values of year, month, day, hours, minutes, and seconds.

DATEVALUE

Returns a date value for a date, datetime, or text expression in the local time zone of the current user.

DATEVALUE(datetime_or_string)

Replace datetime_or_string with a date, datetime, or text value.

DATETIMEVALUE

Returns a datetime value for a date, datetime, or text expression in the local time zone of the current user.

DATETIMEVALUE(date_or_string)

Replace date_or_string with a date, datetime, or text value.

DATETIMEVALUEGMT

Returns a date value for a date, datetime, or text expression in the GMT time zone.

DATETIMEVALUEGMT(datetime_or_string)

Replace datetime_or_string with a date/datetime or text value.

DATETIMETOGMT

Converts a datetime value from the local time zone of a context user to the Greenwich Mean Time value with the datetime type.

DATETIMETOGMT(datetime_object)

Replace datetime_object with a datetime value in the context of the user's local time zone.

ADDDAYS

Returns a new date or datetime value that adds the specified number of days to the value of this instance.

ADDDAYS(date/datetime, number_of_days, boolean_consider_weekends)

Replace:

date/datetime with the date or datetime you want to add days to;

number_of_days with an integer number of days that needs to be added to the original value;

boolean_consider_weekends with true if calculation should exclude Saturday and Sunday, or false if it should not.

ADDMONTHS

Adds the given number of months to the date or datetime value.

ADDMONTHS(date/datetime, number_of_months)

Replace:

date/datetime with the date or datetime you want to add months to;

number_of_months with the integer number of months that needs to be added to the original value.

ADDYEARS

Adds the given number of years to the date or datetime value.

ADDYEARS(date/datetime, number_of_years)

Replace:

date/datetime with the date or datetime you want to add years to;

number_of_years with the integer number of years that needs to be added to the original value.

ADDINTERVAL

Adds a time interval to the datetime based on the business hours for the current Salesforce organization.

circle-info

To access business hours records, navigate to Setup > Company Profile > Business Hours.

ADDINTERVAL(datetime, interval_string, business_hours_id_optional)

Replace:

datetime parameter with a datetime value;

interval_sting with time interval in the '1d 1h 1m' format ;

business_hours_id_optional with an ID of a business hours record used in your organization.

circle-exclamation

SUBTRACTINTERVAL

Subtracts the time interval from the datetime based on the business hours for the current Salesforce organization.

circle-info

To access business hours records, navigate to Setup > Company Profile > Business Hours.

SUBTRACTINTERVAL(datetime, interval_string, business_hours_id_optional)

Replace:

datetime parameter with a datetime value;

interval_sting with time interval in the '1d 1h 1m' format;

business_hours_id_optional with an ID of a business hours record used in your organization.

circle-exclamation

NORMALIZEDATE

Moves a date or datetime to the next working day within business hours.

circle-info

To access business hours records, navigate to Setup > Company Profile > Business Hours.

NORMALIZEDATE(date/datetime, business_hours_id_optional)

Replace:

date/datetime parameter with the value you need to normalize;

business_hours_id_optional with an ID of a business hours record used in your organization.

circle-exclamation

STARTOFDAY

Moves a date/datetime to the start of the working day according to business hours.

circle-info

To access business hours records, navigate to Setup > Company Profile > Business Hours.

STARTOFDAY(date/datetime, business_hours_id_optional)

Replace:

date/datetime parameter with the value you need to calculate;

business_hours_id_optional with an ID of a business hours record used in your organization.

circle-exclamation

ENDOFDAY

Moves a date/datetime to the end of the working day according to business hours.

circle-info

To access business hours records, navigate to Setup > Company Profile > Business Hours.

ENDOFDAY(date/datetime, business_hours_id_optional)

Replace:

date/datetime parameter with the value you need to calculate;

business_hours_id_optional with an ID of a business hours record used in your organization.

circle-exclamation

FORMAT

Returns a value containing a date expression formatted according to the given parameter.

FORMAT(date/datetime, format_string_optional)

Replace:

date/datetime with the original date or datetime value

format_string_optional with an optional valid format expression.

FORMATGMT

Returns a value containing an expression formatted according to the given parameter in GMT time value.

FORMATGMT(date/datetime, format_string_optional)

Replace:

date/datetime with the original date or datetime value

format_string_optional with an optional valid format expression.

STARTOFWEEK

Returns a date or a datetime representing the first day of the week for the date passed to the function in the local time zone of the current user.

STARTOFWEEK(date/dateTime)

Replace date/dateTime parameter with the date or datetime value, whose start date of the week is to be determined.

DAYSBETWEEN

Returns the number of days between two date or datetime values.

DAYSBETWEEN(date/datetime, date/datetime, ignoreWeekends)

Replace:

first two parameters with the two date/datetime values;

boolean ignoreWeekends with true if calculation should exclude Saturdays and Sundays, or false if it should not.

DATEDIFF

Returns the number of minutes, hours, and days between date/datetime values.

circle-info

To access business hours records, navigate to Setup > Company Profile > Business Hours.

DATEDIFF(date/datetime, date/datetime, business_hours_id_optional, result_type_optional, hours_in_day_optional)

Replace:

first two parameters with two dates;

business_hours_id_optional optional parameter with an ID of a business hours record used in your organization;

result_type_optional optional parameter with one of the following values: 'Duration', 'Hours', 'Days' (this parameter is case-insensitive);

circle-info

Duration format looks like this: 1d 7h 45m.

hours_in_day_optional is an optional parameter that can be used when the user passes 'Duration' or 'Days' as a result_type_optional - It defines the number of hours in a day for function calculation.

circle-exclamation

YEAR

Returns the year component of a date or datetime value.

YEAR(parameter)

Replace parameter with the date/datetime value.

MONTH

Returns the month component of a date or datetime value.

MONTH(parameter)

Replace parameter with the date/datetime value.

JSON Functions


JPARSE

Deserializes the specified JSON string into an object or an array.

JPARSE(json_string, separator_optional)

Replace:

json_string parameter with a JSON format string you need to parse;

separator_optional An optional parameter to make the function convert a string to an array by splitting it.

JPARSEXML

Deserializes the specified XML string into an object.

JPARSEXML(xml_string)

Replace xml_string parameter with a string (in XML format) you need to parse.

JOBJECT

Builds an object from provided key names and values.

JOBJECT(key1, value1, key2, value2, ...)

Replace:

key1, key2 parameters with strings that are key names

value1, value2 parameters with strings that are key values

If you omit a value, it will be stored as null.

circle-info

Object values depend on data passed to the function:

  • Blank space and null will give a null value

  • Logical expression, and true will give a true value. False is got in the same way.

  • If the value is numeric (or has a numeric result of a calculation), it will be given as a number, without quotes.

  • To make an empty string value, pass ''.

  • To make a nested object, call JOBJECT function in the proper place.

circle-exclamation

JSTRING

Serializes objects into a JSON string.

JSTRING(json_object)

Replace json_object parameter with an object you need to convert into a string.

JGET

Gets a value from JSON content using a path provided.

JGET(json_object, path)

Replace:

json_object parameter with an object you want to use;

path parameter with the path to find a field in the object (or pass index for arrays).

6. JPUT

Puts a value into the JSON content at the provided path.

JPUT(json_object, path, value)

Replace:

json_object parameter with an object you want to use;

path parameter with the path to find a field in the object to update;

value parameter with the value that a field will be updated with.

circle-info

You can also pass an index as a path if you operate with an array.

If a value needs to be added as the last element of an array, pass -1 as a path.

JREMOVE

Removes a field from JSON content using the provided path.

JREMOVE(json_object, key_or_jsonobject)

Replace:

json_object parameter with an object you want to use;

key_or_jsonobject parameter with the key to find a field you need to remove, or with an array element to be removed from the JSON array.

circle-info

If you need to remove multiple values from an object, you can pass an array of object keys as a key_or_jsonobject

The same is true for JSON arrays: if you need to remove multiple elements, pass an array of elements to remove.

JCLEAR

Clears a whole JSON object or a nested object using the provided path.

JCLEAR(json_object, key_or_jsonobject_optional)

Replace:

json_object parameter with an object you want to use;

key_or_jsonobject_optional optional parameter with the key to find a field you need to remove, or with a path to a nested object as an array of elements.

JSIZE

Returns a number of elements in JSON content.

JSIZE(json_object)

Replace json_object parameter with an object or array you want to get the size of.

JEXIST

Checks if an element exists in JSON.

JEXIST(json_object, path)

Replace:

json_object parameter with an object you want to use ;

path parameter with the path to find a field you need to check (or index if you work with JSON array).

JMERGE

Merges 2 JSON objects into one.

JMERGE(json_object, json_object)

Replace both json_object parameters with objects you want to merge.

JEACH

Executes the specified function for each element of the list.

JEACH(json_array, function, exclude_nulls_boolean)

Replace:

json_array parameter with an array you want to use;

function parameter with expression to be executed for each array element;

optional exclude_nulls_boolean parameter with true to have null values excluded from the resulting array, or with false, if to include null values.

circle-info

You can get the current element by using the merge field "{$JEach}" and the current element index by using the merge field "{$JEachIndex}".

JEACHMAP

Executes specified functions for each key and/or value of the JSON object.

JEACHMAP(json_object, key_function, value_function)

Replace:

json_obect parameter with an object you want to use;

key_function parameter with expression to be executed for each key of the object;

value_function with expression to be executed for each value of the object.

circle-info

If you don't need to trigger function execution for object keys, pass {$JEachKey} as a key_function parameter; if no function needs to be run for object values, pass {$JEach} as value_function a parameter.

You can get current element by using the merge field "{$JEach}" and you can get current element index by using the merge field "{$JEachIndex}".

JVAR

Defines formula local variables.

JVAR(var1_name, va1_value_function, var2_name, va2_value_function, ..., value_function)

Replace:

var1_name, var2_name , etc., parameters with variable names;

va1_value_function, va2_value_function, etc., parameters with an expression to be executed as the value for the variables;

value_function with an expression to be executed as the result of the function.

circle-info

To get access to the variable, use the merge field "{$JVar.var1_name}", where "var1_name" is the variable name.

JFOR

Executes the specified function for each element of the list.

JFOR(from_decimal, to_decimal, expression, exclude_nulls_boolean_optional)

Replace:

from_decimal parameter with a number to start the loop from;

to_decimal with a number to stop the loop at;

expression with expression to be executed for each iteration;

optional exclude_nulls_boolean_optional parameter with true to have null values excluded from the result, or with false to include null values.

System Functions


COLUMNTOTAL

Calculates total quantities of records or evaluates total amounts / minimal values / maximal values/averages of values in the specified or current column, considering column conditions and filters applied.

COLUMNTOTAL(column_id_optional, filter_optional, aggregation_type_optional, aggregation_field_optional).

circle-info

All function parameters are optional and can be omitted (if last) or replaced with null (if not needed), but some arguments should be placed after them.

Parameters:

  • column_id_optional - if left empty or set to null , it will calculate the desired values for the current column. If you specify column ID, it will calculate the result for that column (this argument is necessary if the column is unknown in the current context, e.g., when the function is executed on some cell in the Kanban header).

  • filter_optional - If specified, will add a custom filter string to the query and calculate the result matching this filter.

  • aggregation_type_optional - if left empty or set to null, will calculate total quantity of records matching the query, otherwise will calculate values with the way specified by proper aggregate function (see table below for a list and a SOQL syntaxarrow-up-right web reference for more help).

  • aggregation_field_optional - The API name of the field should be specified when using aggregation types because different aggregation functions support only fields of specific types.

List of aggregation types:

Aggregation function
Returned result
Ignores null values?
Supported field types

COUNT

Number of records matching the query criteria (actually the same result as for empty or null proper argument).

No (if aggregation field is ID or is not specified) Yes (if other aggregation field is specified)

Any

COUNT_DISTINCT

Number of distinct non-null field values matching the query criteria.

Yes

Any

AVG

Average value of a numeric field.

Yes

Numeric

SUM

Total sum of a numeric field.

Yes

Numeric

MIN

Minimum value of a field.

Yes

Any. If use on a picklist field, the function uses the sort order of the picklist values instead of alphabetical order.

MAX

Maximum value of a field.

Yes

Any. If use on a picklist field, the function uses the sort order of the picklist values instead of alphabetical order.

Builds a web URL to the specified Form.

BUILDFORMLINK(form_id, record_id, mode, context_fields, parameters, entire_height, as_html_tag_optional, text_optional)

Parameters:

  • form_id - ID of form to be linked to

  • record_id - ID of record to be used as data source

  • mode - form mode (edit, view, or new)

  • context_fields - JSON with the list of virtual fields and their values (for pre-population)

  • parameters - JSON with parameters that will be passed to the form

  • entire_height - true or false. If set to true, the form will take all available height of the container, even if no such space is required to show form elements

  • as_html_tag_optional - optional argument. If set to true, not only will the form URL be generated, but the HTML tag <a> with href attribute equal to this URL

  • text_optional - optional argument. If set to any text except null, this text will be placed as the inner content of <a> tag (has sense only if as_html_tag_optional is set to true)

circle-info

Note: if omitted record_id argument, form will be shown without object fields populated. If the form mode is "edit", the result will be the same as in "new" mode.

Builds a web URL to the specified Kanban.

BUILDDASHBOARDLINK(dashboard_id, variables, styles, as_html_tag_optional, text_optional)

Parameters:

  • dashboard_id - ID of dashboard (kanban) to be linked to

  • variables - JSON with the list of variables to be passed to the kanban dashboard. This argument is mandatory, so replace it with null if no variables are needed.

  • styles - string with CSS properties to be passed to the kanban dashboard. This argument is mandatory, so replace it with null if no styles are needed.

circle-exclamation
  • as_html_tag_optional - optional argument. If set to true, not only will the kanban dashboard URL be generated, but the HTML tag <a> with href attribute equal to this URL.

  • text_optional - optional argument. If set to any text except null, this text will be placed as the inner content of <a> tag (has sense only if as_html_tag_optional is set to true)

CHECKPERMISSION

Returns true if the current user has listed permissions (any or all), and false otherwise.

CHECKPERMISSION(name_or_names_json_array, atleastone_boolean_optional)

Parameters:

  • name_or_names_json_array - name of the permission to be checked or a JSON array of permission names.

  • atleastone_boolean_optional - if set to trueThe function will return true if the current user has at least one permission from the array in the first argument; otherwise (or if omitted), the function will return true only if the current user has all listed permissions.

USERIN

Returns true if the given user belongs to at least one of the listed users, roles, profiles, queues, or groups.

USERIN(user_id, users_roles_profiles_groups_ids).

Parameters:

  • user_id - ID of the user who is being checked.

  • users_roles_profiles_groups_ids - one ID or a list of IDs of users/roles/profiles/groups/queues.

Charts Functions


PIECHART

Returns URL of dynamically formed .svg image that represents the given data as a pie chart. The chart legend (if turned on) will show proper data with their values, percentage, and total.

PIECHART(values_json_array, size, has_legend, font_size)

Parameters:

  • values_json_array - user data in JSON array. Each array item has the following properties:

    • mandatory decimal value that represents the value of the chart item

    • optional string title that will be written in the chart legend next to the proper item, after its value and before the percentage.

    • optional string color that will be applied to the chart sector representing the proper value. If you omit this property, the system will assign a random color.

  • size - chart diameter size in pixels. If legend is on, the width will be 2 times bigger. This argument is optional (set it to null if you do not want to specify size); the default size is 100.

  • has_legend - set to true if legend should be displayed, set to null or false if not.

  • font_size - font size of legend (in pixels). If set to null, the font size will be calculated to fit the chart height, but not exceed 19px.

circle-exclamation

DONUTCHART

Returns URL of dynamically formed .svg image that represents the given data as a Donut Chart. The chart legend (if enabled) will show the correct data with its values and percentages. The total (if allowed) will be shown in the chart's center hole.

DONUTCHART(values_json_array, size, hole_size, has_legend, font_size, has_total)

Parameters:

  • values_json_array - User data in JSON array. Each array item has the following properties:

    • Mandatory decimal value that represents the value of the chart item

    • Optional string title That will be written in the chart legend next to the proper item, after its value and before the percentage.

    • Optional string color That will be applied to the chart sector representing the proper value. If you omit this property, the system will assign a random color.

  • size - Chart diameter size in pixels. If legend is on, the width will be 2 times bigger. This argument is optional (set it to null if you do not want to specify size); the default size is 100.

  • hole_size - Chart hole radius size in pixels (or null). The default value will be calculated as 60% of the chart radius.

  • has_legend - Set to true if legend should be displayed, set to null or false if not.

  • font_size - Font size of legend (in pixels). If set to null, font size will be calculated to fit the chart height, but not more than 19px.

  • has_total - Set to true if the total sum should be displayed, set to null or false if not. The total will be displayed in the center of the donut hole. The font size of the total depends on the hole size and fits it automatically.

circle-exclamation

PROGRESSCHART

Returns URL of dynamically formed .svg image that represents given data as a Progress Bar Chart. The chart legend (if enabled) will show each value with its percentage.

PROGRESSCHART(value, total, width, height, has_legend, font_size, color, bg_color, border_color, font_color)

Parameters:

  • value - Actual decimal value (mandatory).

  • total - The maximum value that can be reached (mandatory).

  • width - Chart width in pixels (optional). Default = 100. If a legend is shown, it will take some of this space.

  • height - Chart height in pixels (optional). Default = 100.

  • has_legend - Set to 1 if legend should be displayed, omit or set to 0 if not.

  • font_size - Font size of legend (in pixels, optional). If omitted, font size will be calculated to fit the chart height, but not more than 19px.

  • color - color of filled part of progress chart (optional, default is gray).

  • bg_color - color of progress chart background (optional, default is light gray).

  • border_color - color of progress chart border (optional, by default it is inherited from the color of the filled part of the progress chart).

  • font_color - color of legend text (optional, default is black).

circle-info

Note: parameters noted as optional should be present in the function expression. Do not omit them, instead set them to null if you do not need override default values.

Last updated