Fields / data type
Formula
A read-only value calculated from other fields and supported functions.
When to use it
A value should always be calculated from other values instead of entered by a user.
Example
A label based on Amount and Status.Configure this field
Provide an expression and choose a return type: Text, Number, Currency, Percent, Boolean, Date, Date/Time, Time, Phone, or Link. A Link formula gives Hyperlink(url, label, "_blank" or "_self") and is shown as a clickable link on the record page, in record lists, Related Records and reports (elsewhere, its value is its address); only https://, http://, mailto: and tel: addresses are links. A Time formula is shown as a time on the reader's clock, like a Time field. The formula validator checks syntax and verifies that the expression returns the selected type. A Boolean formula is displayed on the record page as a read-only checkbox. A Phone formula is shown like a phone field, so its result must come strictly from a phone field: a phone field of the record or through a relationship (for example PrimaryContactId.Phone), another Phone formula, or IF, Case and FirstNotBlank choosing between phone fields (or blank). Typed text, text joined with +, and text functions are refused. A phone field a Phone formula returns can't be converted to another type, and a Phone formula another one returns can't change its return type, until that formula is changed.
Limitations
Formula fields are always read-only and cannot be required. They do not support length, picklist options, relationships, auto-number settings, or precision. Decimal places can be set only for numeric formula return types.
Formula syntax
Use field API names, numbers, quoted text such as "Approved", and the values true, false, and null. Supported operators are =, !=, >, <, >=, <=, +, -, *, and /.
IF(Amount > 1000, "Large", "Standard")
ROUND(Amount * 0.1, 2)
DueDate - TODAY()
CreatedDate + PaymentTermDays < TODAY()Use the field picker, function picker, and operator picker in the editor: the function picker lists every function, and you can type part of a name to find it. Relationship paths can use dots, naming each lookup by its field API name, such as AccountId.Name, up to three levels deep. The expression must return the type selected for the field.
Every value has a kind, and a formula is checked when it is saved
A value is a Number, Text, a True/False value, a Date, or a Date/Time. Currency and Percent fields are Numbers; Picklist, Multi-Picklist, Tags, Auto-Number, Email, Phone, URL and lookup fields are Text (a Multi-Picklist's values and a record's tags are written one after the other with a comma between them: Contains(Tags, "vip"); to ask whether one of them is exactly a value, use Includes(Tags, "VIP"), which never matches part of another value). A Checkbox is always True or False — a box nobody ticked is False, never blank. An Address field and a Geolocation field hold several values at once and can't be used in a formula — use an address's own parts instead, such as BillingAddress_city.
When you save a formula — or press Validate Formula, which runs exactly the same check — every function must be given the kind of value it works on, and the message tells you which value is wrong and how to fix it:
- A condition is a real True/False value. Write
IF(Amount > 0, ...)orIF(NOT(IsBlank(Name)), ...), notIF(Amount, ...)orIF(Name, ...). The same goes forAND,ORandNOT. - A checkbox is True or False, never a number.
Paid + 1is refused; writeIF(Paid, 1, 0). - Number functions take a Number, date functions a Date or Date/Time. Turn text into a number with
Number(...)and into a date withDate(...)orDateTime(...). - Text functions take any value and write it as text first, the way the screen shows it.
- A comparison has the same kind of value on both sides: a Number with a Number, Text with Text, a Date or Date/Time with a Date or Date/Time, a checkbox with
TrueorFalse(with=or!=only). Compare a date with a typed date asDueDate > Date("2026-01-01"). Text is compared with its capitals: useLower(Name) = "acme"to ignore them.
Dates and times
Every date and time is kept in UTC and shown to each person on their own clock (their Time Zone in User Settings, or the workspace's). Whenever a formula needs the date of a Date/Time — Date(CreatedDate), Day(...), DaysBetween, or comparing a Date/Time with a Date — it is the date that person sees. Today() is their own date too. A record created at 6:00 PM on October 10 in Los Angeles is, for someone in Madrid, a record of October 11.
- Add or take days with
+and-:DueDate + 30,CreatedDate - 7. A Date stays a Date; a Date/Time keeps its time and moves by exactly 24 hours a day (so across a clock change the displayed time shifts by an hour). Whole days only: part of a day is a formula error. - Add or take hours with
AddHours:AddHours(StartDateTime, 1.5)is an hour and a half later,AddHours(StartDateTime, -2)two hours earlier. A Time goes round the clock:AddHours(CallTime, 2)of 11:00 PM is 1:00 AM. - Subtract two dates to get the whole days between them:
DueDate - Today(). A Date/Time counts as its date. - A Date with a Date/Time (in
IF,Min,Max,FirstNotBlank, or a comparison) is worked as dates and gives a Date. - Months and years use
AddMonthsandAddYears. - The hour and minute of a Date/Time are
Hour(...)andMinute(...), on the reader's own clock like the date — no time zone shift needed:Hour(NOW()) < 12is the morning wherever they are. - Someone else’s clock:
Today,Date,DateTime,Year,Month,Day,DaysBetween,Time,HourandMinutetake a time zone as their last value, likeHour(NOW(), "America/New_York"), to work on that zone’s clock instead — for an email to a customer, the zone can come from the record:Hour(NOW(), Case(State, "Florida", "America/New_York", "Texas", "America/Chicago", "")). A blank zone is ignored. Only a Date/Time or a Time uses the zone: a plain Date has no clock, so the zone is ignored.
Old and new values
Where a record is being saved — a validation rule, a flow started by a record — a formula can see the record as it was before the save:
OldRecord.<Field>is the field's value before the save (blank while the record is being created):AND(OldRecord.StageName = "Closed Won", StageName != "Closed Won")stops a won deal being reopened. In a validation rule's Fields picker they are under Old Record.IsChanged(field)is whether the save changes the field:AND(IsChanged(Amount), StageName = "Closed Won"). A new record has nothing changed: it is False then.IsNew()is whether the record is being created:AND(IsNew(), StageName = "Closed Won").
Only the record's own fields have an old value. Formula fields, default values, rollup filters, duplicate rules and approval formulas have no “before”, and refuse them when saved. Record Auto-Assignment and Default Folders rules can use is changed as a condition's operator.
Blank values
- In
+and*a blank is skipped: with Quantity empty,Amount + Quantityis Amount andPrice * Quantityis Price. - In
-and/a blank on the right is skipped, and a blank on the left gives a blank. With both sides blank the result is blank. - On its own, a blank is nothing:
Quantity < 100andQuantity = 0are both false when Quantity is empty, so a validation rule never fires just because a field was left empty. Note thatPrice * Quantity < 100compares Price with 100 when Quantity is empty. - To count a blank as 0, say so:
FirstNotBlank(Quantity, 0). - A blank number of days leaves a date as it is; a blank date gives a blank.
- Empty text: a text field that was never filled in and one that was emptied are the same: both equal
""and both areIsBlank. - Dividing by zero is an error: the field shows a formula error, and a flow run stops. Guard it:
IF(Quantity = 0, 0, Amount / Quantity). - A value that failed is not a blank. When a formula field uses another formula field that failed (its own, or one on a related record), it fails too and shows “Depends on '<field>', which failed to evaluate.” — it never quietly computes a number as if the failed value were empty. A formula that never reaches the failed value (the branch of an
IFthat is not taken), that replaces it (FirstNotBlank(Rate, 0)), or that only asks whether it is there (IsBlank(Rate)) keeps its own result.
Values written as text
When a value becomes text — in Text(...), joined with +, or given to a text function such as Length or Contains — it is written the way the screen shows it:
- A number has no zeros it doesn't need:
100,12.5. - Money has its symbol, thousands separators and two decimals:
$100.00,$1,200.00. What a formula works out from money is still money:Text(Price * 2),Text(Price + 10),Text(Price * TaxRate)andText(Round(Price, 0))all read as money. Money divided by money is how many times — a plain number. - A percentage ends in %:
20%. A percentage with another percentage or a typed number is still a percentage (Text(Rate + 5)is25%,Text(Rate * 2)is40%). A percentage of a number field is a plain number (Text(Quantity * Rate)with 3 and 20% is0.6), and so is a number divided by a percentage. - A checkbox is
TrueorFalse. - A Date is in the workspace's date format (
10/10/2026); a Date/Time is on the clock of whoever is reading it (10/10/2026, 6:00 PM). If that text is saved into a field, it is saved as the person saving it saw it.
Because of this, Length(Price) for a price of 100 is 7 ($100.00), and Contains(Price, "$") is True. If you don't want to count the symbol, subtract it: Length(Price) - 1.
Common formulas
Overdue (True/False): AND(Paid = False, CreatedDate + PaymentTermDays < Today())
Due date (Date): Date(CreatedDate) + PaymentTermDays
Days until renewal: RenewalDate - Today()
Days since last contact: Today() - LastContactedAt
Line total: Price * FirstNotBlank(Quantity, 0)
Average, guarded: IF(Quantity = 0, 0, Amount / Quantity)
Rounded to cents: Round(Amount * 0.0825, 2)
Full name: Trim(Concat(FirstName, " ", LastName))
Label with a date: "Renews on " + RenewalDate
Size band (Text): IF(Amount >= 10000, "Large", IF(Amount >= 1000, "Medium", "Small"))
Same month as today: AND(Month(CloseDate) = Month(Today()), Year(CloseDate) = Year(Today()))
Same quarter as today: OR(AND(Ceil(Month(SignedOn) / 3) = Ceil(Month(Today()) / 3), Year(SignedOn) = Year(Today())), IsNull(SignedOn))
Time of day (Text): IF(Hour(NOW()) < 12, "Morning", IF(Hour(NOW()) < 18, "Afternoon", "Evening"))
Stage rank (Number): Case(StageName, "Prospecting", 1, "Negotiation", 2, "Closed Won", 3, 0)
Even quantity: Mod(Quantity, 2) = 0
Compound growth: Round(Principal * Power(1 + Rate, Years), 2)
Ten-digit phone: MatchesPattern(Phone, "[0-9]{10}")
Has a gold interest: Includes(Interests, "Gold")
Map link (Link formula): Hyperlink("https://maps.google.com/?q=" + BillingCity, "Map", "_blank")
Amount locked once won: AND(IsChanged(Amount), StageName = "Closed Won") (validation rule)
Ignore capitals: Lower(Email) = Lower(SecondaryEmail)Function reference
Open a function for its exact signature, behavior, return value, example, and limitations.
IFIF(condition, whenTrue, whenFalse)
Returns one value when the condition is true and another when it is false.
Returns: The selected true or false value.
Example:
IF(Amount > 1000, "Large", "Standard")Notes: The condition must be a real True/False value: write Amount > 0 or NOT(IsBlank(Name)), not just Amount or Name. Both results must be the same kind of value (a Date with a Date/Time gives a Date); either may be null.
ANDAND(value1, value2, ...)
Returns true only when every supplied value is true.
Returns: Boolean.
Example:
AND(IsActive = True, Amount > 0)Notes: Accepts one or more arguments. Every argument must be a True/False value.
OROR(value1, value2, ...)
Returns true when at least one supplied value is true.
Returns: Boolean.
Example:
OR(Status = "New", Status = "Working")Notes: Accepts one or more arguments. Every argument must be a True/False value.
NOTNOT(value)
Reverses a True/False value.
Returns: Boolean.
Example:
NOT(IsClosed)Notes: The argument must be a True/False value: NOT(IsBlank(Name)), not NOT(Name).
FirstNotBlankFirstNotBlank(value1, value2, ...)
Returns the first value that is not null or an empty/whitespace-only string.
Returns: The first non-blank value, or null.
Example:
FirstNotBlank(Quantity, 0)Notes: Accepts one or more arguments, all of the same kind. Use FirstNotBlank(field, 0) to count a blank number as 0.
IsBlankIsBlank(value)
Checks whether a value is null or an empty/whitespace-only string.
Returns: Boolean.
Example:
IsBlank(RenewalDate)IsNullIsNull(value)
Checks whether there is no value at all.
Returns: Boolean.
Example:
IsNull(AccountId)Notes: Unlike IsBlank, text that holds only spaces is not null.
TextText(value)
Writes any value as text, the way the screen shows it.
Returns: Text.
Example:
Concat("Due ", Text(DueDate))Notes: A number has no unneeded zeros (100, 12.5); a Percent ends in % (20%); money has its symbol, thousands separators and two decimals ($100.00, $1,200.00) -- and what a formula works out from money is still money, so Text(Price * 2) reads as money too; a checkbox is True or False; a Date is in the workspace's date format (10/10/2026); a Date/Time is on the clock of whoever reads it (10/10/2026, 6:00 PM). If that text is saved, it is saved as the person saving it saw it.
ConcatConcat(value1, value2, ...)
Joins values together as text.
Returns: Text.
Example:
Concat(FirstName, " ", LastName)Notes: Takes any kind of value; each is written as Text() writes it. Null values are empty text.
LowerLower(value)
Converts text to lowercase.
Returns: Text.
Example:
Lower(Email)Notes: A value that is not text is written as text first, as Text() writes it.
UpperUpper(value)
Converts text to uppercase.
Returns: Text.
Example:
Upper(CountryCode)Notes: A value that is not text is written as text first, as Text() writes it.
TrimTrim(value)
Removes whitespace from the beginning and end of text.
Returns: Text.
Example:
Trim(CustomerReference)LengthLength(value)
Counts the characters in a text value, spaces included.
Returns: Number.
Example:
Length(Description)Notes: A value that is not text is counted as the screen shows it: Length of a Currency of 100 is 7 ($100.00). Subtract what you don't want to count: Length(Price) - 1.
LeftLeft(value, count)
Returns characters from the beginning of text.
Returns: Text.
Example:
Left(PostalCode, 3)Notes: The count must be a Number; a negative number typed into the formula is refused, and a count of zero or less from a field returns empty text.
RightRight(value, count)
Returns characters from the end of text.
Returns: Text.
Example:
Right(ReferenceCode, 4)Notes: The count must be a Number; a negative number typed into the formula is refused, and a count of zero or less from a field returns empty text.
SubstringSubstring(value, start, length?)
Returns part of a text value. The start position is 1-based.
Returns: Text.
Example:
Substring(ProductCode, 2, 3)Notes: If length is omitted, it returns from start to the end. Start and length must be Numbers.
ContainsContains(text, search, ignoreCase?)
Checks whether text contains the search value.
Returns: Boolean.
Example:
Contains(Description, "renewal")Notes: Case-insensitive by default; pass False as the third argument for case-sensitive matching. The third argument must be True or False.
FindFind(text, search, ignoreCase?)
Gives where the search text starts inside the text, counting from 1 like Substring.
Returns: Number.
Example:
Substring(Duration, 3, Find(Duration, "H") - 3)Notes: Gives 0 when the search text is not there, and the first place when it is there more than once. Case-insensitive by default; pass False as the third argument for case-sensitive matching. The third argument must be True or False.
StartsWithStartsWith(text, prefix, ignoreCase?)
Checks whether text begins with the prefix.
Returns: Boolean.
Example:
StartsWith(Email, "sales@")Notes: Case-insensitive by default. The third argument must be True or False.
EndsWithEndsWith(text, suffix, ignoreCase?)
Checks whether text ends with the suffix.
Returns: Boolean.
Example:
EndsWith(Email, ".com")Notes: Case-insensitive by default. The third argument must be True or False.
ReplaceReplace(value, search, replacement)
Replaces every occurrence of search text with replacement text.
Returns: Text.
Example:
Replace(Phone, "-", "")UrlEncodeUrlEncode(value)
Makes text safe to put in a URL, such as an API Call step's URL: every character other than letters, digits and - _ . ~ is written as a % code, so a space is %20 and & is %26.
Returns: Text.
Example:
Concat("https://maps.googleapis.com/maps/api/geocode/json?address=", UrlEncode(Concat(Record.City, ", ", Record.State)))Notes: A value merged into a URL is sent as it is, so a value with &, #, + or = breaks the URL; wrap it in UrlEncode. Don't wrap a value that is already part of a URL (a whole address or a query string such as a=1&b=2): its / ? & and = would be encoded too. A value that is not text is written as text first. A blank gives blank text.
NumberNumber(value)
Turns text into a number.
Returns: Number or null.
Example:
Number(ScoreText)Notes: The text must be the number alone, such as 1200.50: a symbol, a comma or a % ("$100", "1,200", "20%") is not read. Empty text and null give null. A checkbox or a date is refused when the formula is saved.
AbsAbs(value)
Returns the absolute value of a number.
Returns: Number or null.
Example:
Abs(Variance)Notes: Takes a Number only: turn text into one with Number(...). Returns null for null input.
RoundRound(value, digits?)
Rounds a number to the requested number of decimal places. A half rounds away from zero: 2.5 is 3 and -2.5 is -3.
Returns: Number or null.
Example:
Round(Amount * 0.0825, 2)Notes: If digits is omitted, it rounds to a whole number. Digits below zero round to tens, hundreds and so on: Round(1234, -2) is 1200.
RoundUpRoundUp(value, digits?)
Rounds a number away from zero, always: 2.1 is 3 and -2.1 is -3.
Returns: Number or null.
Example:
RoundUp(Hours / 8, 0)Notes: Digits work as in Round, including below zero: RoundUp(1201, -2) is 1300.
RoundDownRoundDown(value, digits?)
Rounds a number toward zero, always: 2.9 is 2 and -2.9 is -2.
Returns: Number or null.
Example:
RoundDown(Amount, 2)Notes: Digits work as in Round, including below zero: RoundDown(1299, -2) is 1200.
FloorFloor(value)
Rounds a number down to the nearest whole number.
Returns: Number or null.
Example:
Floor(Quantity)CeilCeil(value)
Rounds a number up to the nearest whole number.
Returns: Number or null.
Example:
Ceil(Quantity)MinMin(value1, value2, ...)
Returns the smallest non-null supplied value.
Returns: The smallest value, or null.
Example:
Min(DiscountA, DiscountB)Notes: All values must be Numbers, or all Text, or all Dates and Date/Times (together those are compared as dates and give a Date). Text is ordered with capital letters first; compare Lower(...) of each value to ignore capitals.
MaxMax(value1, value2, ...)
Returns the largest non-null supplied value.
Returns: The largest value, or null.
Example:
Max(ScoreA, ScoreB)Notes: All values must be Numbers, or all Text, or all Dates and Date/Times (together those are compared as dates and give a Date). Text is ordered with capital letters first; compare Lower(...) of each value to ignore capitals.
NegateNegate(value)
Changes a number's sign.
Returns: Number or null.
Example:
Negate(Balance)TodayToday(zone?)
Returns today's date for the person using it: their own Time Zone (User Settings), or the workspace's Time Zone if they haven't set one. Scheduled and other background work uses the workspace's Time Zone. With a time zone, it is today's date in that zone.
Returns: Date.
Example:
Today("America/New_York")Notes: The time zone is optional: one from the Time Zone field's list, like "America/New_York", typed or from a field (a Time Zone field, a picklist or text). A blank zone is ignored, as if it was not given. A typed zone that is not on the list is refused when the formula is saved; one from a field is a formula error when the formula is worked out.
NowNow()
Returns the current date and time. It is kept in UTC like every date and time, and shown on each person's own clock.
Returns: Date/Time.
Example:
LastContactedAt < Now() - 30Notes: Takes no arguments.
DateDate(value, zone?)
Gives the date of a Date/Time (the date the person reading it sees), or turns text into a date.
Returns: Date or null.
Example:
Date(CreatedDate)Notes: Text must be written like 2026-10-10 (a time may follow: 2026-10-10 14:30:00, read on the clock of the person using it when no zone is written); other forms such as 10/10/2026 are not read. Null and empty text give null. With a time zone (optional, as in Today), the date of a Date/Time is its date in that zone and text with a time is read on that zone's clock; a plain Date is given back as it is.
DateTimeDateTime(value, zone?)
Turns a Date or text into a Date/Time.
Returns: Date/Time or null.
Example:
DateTime("2026-10-10 14:30:00")Notes: A Date becomes the start of that date on the clock of the person using it. Text is written like 2026-10-10 14:30:00; a time with no zone is read on the clock of the person using it, one with a zone (2026-10-10T14:30:00Z) is that moment. Null and empty text give null. With a time zone (optional, as in Today), text is read on that zone's clock: DateTime("2026-10-10 09:00:00", "America/New_York") is 9:00 AM in New York. A plain Date ignores the zone and becomes the start of that date on the clock of the person using it.
YearYear(value, zone?)
Extracts the year from a date or date/time value.
Returns: Number or null.
Example:
Year(ContractStartDate)Notes: Takes a Date or a Date/Time only: turn text into one with Date(...). A time zone given last, like "America/New_York", is used for a Date/Time only: a plain Date has no clock, so the zone is ignored. The time zone is optional, as in Today.
MonthMonth(value, zone?)
Extracts the month number from a date or date/time value.
Returns: Number or null.
Example:
Month(RenewalDate)Notes: Takes a Date or a Date/Time only: turn text into one with Date(...). A time zone given last, like "America/New_York", is used for a Date/Time only: a plain Date has no clock, so the zone is ignored. The time zone is optional, as in Today.
DayDay(value, zone?)
Extracts the day of the month from a date or date/time value.
Returns: Number or null.
Example:
Day(InvoiceDate)Notes: Takes a Date or a Date/Time only: turn text into one with Date(...). A time zone given last, like "America/New_York", is used for a Date/Time only: a plain Date has no clock, so the zone is ignored. The time zone is optional, as in Today.
AddDaysAddDays(value, days)
Gives the date a whole number of days later (earlier, for a negative number). The same as value + days.
Returns: What it was given: a Date for a Date, a Date/Time for a Date/Time.
Example:
AddDays(CreatedDate, PaymentTermDays)Notes: A Date/Time moves by exactly 24 hours a day and keeps its time. Whole days only: part of a day (1.5, or 1/24) is a formula error that says to use AddHours. A blank number of days gives the same date; a blank date gives null.
AddHoursAddHours(value, hours)
Gives the Date/Time or Time a number of hours later (earlier, for a negative number). Part of an hour counts: 1.5 is an hour and a half.
Returns: What it was given: a Date/Time for a Date/Time, a Time for a Time.
Example:
AddHours(StartDateTime, 1)Notes: A Date/Time moves by exactly that time. A Time goes round the clock: 11:00 PM plus 2 is 1:00 AM, to the minute, as that time today on the clock of the person the formula runs for (like Time). A plain Date has no time and is refused ("AddHours needs a Time or a Date/Time."). A blank number of hours gives the same value; a blank value gives null.
AddMonthsAddMonths(value, months)
Gives the date a whole number of months later (earlier, for a negative number).
Returns: What it was given: a Date for a Date, a Date/Time for a Date/Time.
Example:
AddMonths(ContractStartDate, 12)Notes: When the destination month has fewer days, it uses that month's final day. A Date/Time keeps its time; the month is added on the UTC calendar.
AddYearsAddYears(value, years)
Gives the date a whole number of years later (earlier, for a negative number).
Returns: What it was given: a Date for a Date, a Date/Time for a Date/Time.
Example:
AddYears(ContractStartDate, 1)Notes: Uses the same end-of-month behavior as AddMonths.
DaysBetweenDaysBetween(dateA, dateB, zone?)
Subtracts dateB from dateA and returns the whole-day difference. The same as dateA - dateB.
Returns: Number or null.
Example:
DaysBetween(RenewalDate, Today())Notes: A Date/Time counts as the date the person reading it sees. Returns null if either date is null; a past first date produces a negative result. With a time zone (optional, as in Today), a Date/Time counts as its date in that zone; a plain Date ignores the zone.
TimeTime(hour, minute, zone?)
That time of day today, on the clock of the person the formula runs for (their Time Zone, else the workspace's). With a time zone, that time today in that zone: Time(9, 0, "America/New_York") is 9:00 AM in New York.
Returns: Time or null.
Example:
Time(9, 30)Notes: The hour is 0 to 23 and the minute 0 to 59; anything else is refused with "Time needs an hour from 0 to 23 and a minute from 0 to 59." Returns null if either is null. The time zone is optional, as in Today; a blank one is ignored.
HourHour(value, zone?)
The hour of a Time or a Date/Time, 0 to 23, on the clock of the person the formula runs for -- the hour they see on the screen. With a time zone, the hour in that zone.
Returns: Number or null.
Example:
IF(Hour(NOW()) < 12, "Morning", IF(Hour(NOW()) < 18, "Afternoon", "Evening"))Notes: Takes a Time or a Date/Time, such as Created Date or NOW(); a plain Date has no time and is refused ("Hour needs a Time or a Date/Time."). It is already on the reader's own clock; for someone else's clock, such as an email's recipient, give their time zone (optional, as in Today): Hour(NOW(), Case(State, "Florida", "America/New_York", "Texas", "America/Chicago", "")). A blank zone is ignored. Returns null if the value is null.
MinuteMinute(value, zone?)
The minute of a Time or a Date/Time, 0 to 59, on the clock of the person the formula runs for. With a time zone, the minute in that zone.
Returns: Number or null.
Example:
Minute(CreatedDate)Notes: Takes a Time or a Date/Time; a plain Date is refused ("Minute needs a Time or a Date/Time."). The time zone is optional, as in Today; a blank one is ignored. Returns null if the value is null.
IsWorkingNowIsWorkingNow(user)
True when, at this moment, the user is within the Working Hours set for today's weekday (Set Working Hours in User Settings, or on the user's page in Setup > Users), read on that user's own clock: their Time Zone, else the workspace's. A day's Start counts as working and its End does not: with 9:00 AM to 5:00 PM, 9:00 AM is working and 5:00 PM is not. Give the user as a field that holds one, like OwnerId, or leave it out to mean the person the formula runs for: whoever is viewing the record, list or report; in a flow that runs when a record is saved, the person who saved it.
Returns: Boolean (True or False, never blank).
Example:
IsWorkingNow(OwnerId)Notes: False when the user has no Working Hours set, when today's day is not a working day, while the user is Out of Office (from the start to the end of their Out of Office dates), and when there is no person to check: IsWorkingNow() in a flow that does not start from a record being saved (a schedule, the Run button, an inbound webhook, a guided screen) is always False, so give it a user there. The answer is worked out each time the formula is read, so a formula field using it can show True to one person and later False.
CaseCase(value, match1, result1, match2, result2, ..., otherwise?)
Compares the value with each match in turn and gives the result of the first one that matches. The last value, when there is one left over after the pairs, is what it gives when nothing matches.
Returns: The chosen result, or null.
Example:
Case(StageName, "Prospecting", 1, "Negotiation", 2, "Closed Won", 3, 0)Notes: Leave the last value out and Case gives null (blank) when nothing matches: Case(Region, "EU", "Europe", "US", "Americas"). A match compares as = does: capitals count (WEB is not web), and a blank matches empty text. Every match must be the same kind of value as the first value, and every result the same kind as the others, like IF's two results. Only the result that is picked is worked out, so Case(Code, "A", 10, 1 / 0) gives 10 for A without an error.
ModMod(number, divisor)
The remainder of dividing a number by the divisor.
Returns: Number or null.
Example:
Mod(Quantity, 2) = 0Notes: The remainder has the divisor's sign, as in spreadsheets: Mod(7, 3) is 1, Mod(-7, 3) is 2 and Mod(7, -3) is -2. That keeps cycles from going negative: Mod(DaysBetween(TODAY(), StartDate), 7) is always 0 to 6. Mod(x, 0) is a formula error (Division by zero). Takes Numbers only; a blank gives null. Money stays money: Mod(Amount, 100).
PowerPower(number, exponent)
Raises a number to a power.
Returns: Number or null.
Example:
Round(Principal * Power(1 + Rate, Years), 2)Notes: Power(2, 3) is 8 and Power(9, 0.5) is 3 (a square root). A fractional power of a negative number (Power(-8, 0.5)) is not a real number and is a formula error, and so is a result with more than 18 digits. Takes Numbers only; a blank gives null. Power of money is a plain number.
MatchesPatternMatchesPattern(text, pattern)
Whether the WHOLE text matches the pattern (a regular expression).
Returns: Boolean (null when the pattern is blank).
Example:
MatchesPattern(Phone, "\+?[0-9 ()-]{7,20}")Notes: The whole value must match: MatchesPattern(Code, "[0-9]{10}") is true for 5551234567 and false for "call 5551234567" (use ContainsPattern for that). A blank text gives False. A pattern typed into the formula is checked when it is saved; one taken from a field is checked when the formula runs. Patterns are at most 1,000 characters. Matching never gets stuck on a long text; the few pattern features that could make it slow -- look-behind such as (?<=a) and back-references such as \1 -- are not supported and are refused. To ignore capitals, allow both in the pattern ([a-zA-Z]) or start it with (?i).
ContainsPatternContainsPattern(text, pattern)
Whether the pattern (a regular expression) is anywhere in the text.
Returns: Boolean (null when the pattern is blank).
Example:
ContainsPattern(Description, "[0-9]{3}-[0-9]{4}")Notes: ^ and $ still anchor it to the start and the end: ContainsPattern(Subject, "^RE:"). Everything else works as in MatchesPattern.
IncludesIncludes(field, value)
Whether a multi-picklist or Tags field has exactly that value among its values.
Returns: Boolean.
Example:
Includes(Interests, "Gold")Notes: Unlike Contains, it matches a whole value only: with Rose Gold selected, Includes(Interests, "Gold") is False while Contains(Interests, "Gold") is True. Capitals count, as everywhere a picklist value is matched. A value typed into the formula must be one of the multi-picklist's values (inactive ones included), so a typo is refused when the formula is saved; tag names are not checked, since they are not a fixed list. A blank field gives False. A multi-picklist or Tags field still works as text in every other function.
HyperlinkHyperlink(url, label, opensIn?)
A clickable link: the result of a Link formula field.
Returns: A link.
Example:
Hyperlink("https://maps.google.com/?q=" + BillingCity, "Map", "_blank")Notes: Only a formula field whose result type is Link can give one; anywhere else it is refused ("Hyperlink can only be the result of a Link formula field."). The last value is typed as "_blank" (opens in a new tab) or "_self" (the same tab, also when it is left out). The address must start with https://, http://, mailto: or tel:; typed otherwise it is refused, and one built from a field that doesn't is shown as plain text. A blank label shows the address. IF and Case can choose between links. The link shows on the record page, in record lists, Related Records and reports; elsewhere -- the API, exports, email merges, flows and other formulas -- a Link field's value is its address.
ConfigConfig(configuration, row, column)
A Custom Configuration's value: the column of one of its rows.
Returns: The column's type: a Number column gives a number, a Percent column a percentage, a Date column a date, and so on.
Example:
Amount * Config("Shipping_Rates", BillingCountry, "Rate")Notes: The configuration and the column are their API Names, typed as text, and are checked when the formula is saved. The row is typed too, or comes from the record; it is found by its API Name, else by its Label, capitals aside, and a row that isn't there gives a blank. A User lookup column gives the user's Id, a lookup to another configuration the row's API Name. Includes works on a Multi-Select Picklist column. Works wherever a formula works. See Custom Configurations.
IsChangedIsChanged(field)
Whether the save is changing that field: its value now against its value before the save.
Returns: Boolean.
Example:
AND(IsChanged(Amount), StageName = "Closed Won")Notes: Only where a record is being saved: validation rules, and flows started by a record (there, name the field as Record.Amount). Anywhere else it is refused. Only the record's own fields, not a related record's. Values are compared as = compares them, so emptying a field that was never filled is not a change. While a record is being created nothing is changed: IsChanged is False -- use IsNew() for rules about new records.
IsNewIsNew()
Whether the record is being created.
Returns: Boolean.
Example:
AND(IsNew(), StageName = "Closed Won")Notes: Only where a record is being saved: validation rules, and flows started by a record. Takes no arguments.