Cert++
Close

Text functions in formula fields

Key Takeaway

Wrap a non-text field in TEXT to join it to text, and expect plain output with no currency symbols, percent symbols, or commas. On a picklist, TEXT returns the API name, not the label.

Text functions let a formula build, inspect, and convert text. For example, a formula can join fields into an ID, pull the last four characters of a value, or check whether a field contains a word. Text functions also connect field types: TEXT turns numbers, dates, and picklist values into text, and VALUE turns text back into a number.

Literal text and joining text

To put literal text in a formula, wrap it in quotation marks. To join pieces of text, use the & or + concatenate operator.

"CASE: " & CaseNumber__c
// displays CASE: followed by the case number

"Expense-" & Trip_Name__c & "-" & ExpenseNum__c
// builds an expense label

In both formulas, the parts in quotation marks are literal text, and the & operator joins them to the field values.

To show a quotation mark or a backslash as a literal character, put a backslash (\) before it.

"Trouble\\Case \"Ticket\": "
// displays on detail pages as: Trouble\Case "Ticket":

In this formula, \\ displays one backslash and \" displays one quotation mark.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Given a scenario, demonstrate the use of formula fields to meet stated business requirements

0/16

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers. 757 members and growing.