Functions in Formula Fields
Function performs a specific operation on values that you specify and generates a new value. To compose a function, you need to type the function name, followed by a set of parentheses(). The formula type custom field supports four different functions:
- Numeric Functions
- String Functions
- DateTime Functions
- Boolean (Logical) Functions
Numeric Functions
A numeric function in formula fields is used to work with numeric data types and accepts numeric results. Numeric functions are generally used to display the results of typical mathematical calculations. The numeric values (arguments) can be integers or decimals, positive or negative. For instance, the formula can use number values as 10, -12, +52, etc.
String Functions
A String is a specialized set of characters (that can contain spaces and numbers) or a contiguous sequence of symbols or values enclosed within quotes so as to be differentiated from a number or a variable name. A string function is used to manipulate or edit the contents of a string.
DateTime Functions
DateTime functions are used when working with time and date types such as identifying the day of the week for a given date. You can use these functions when you need the values to contain both date and time information in a specified format. For instance, the formula can return a value as YYYY-MM-DD HH:MM.
Boolean Functions
A boolean function determines the value output based on the logical calculation of the inputs. In other words, a boolean function evaluates the truth or fallacy of each element of its domain. It confirms the entities having just two values: 1 or 0, true or false, etc. along with the operations and, or and not.