Cert++
Close

Picklist values in formula fields

Key Takeaway

A formula can't compare a picklist field with = or !=. Use ISPICKVAL, CASE, or TEXT for a single-select picklist, and use INCLUDES to check for a value in a multi-select picklist.

A picklist field doesn't work like a plain text field in a formula, so formulas use a small set of special functions to read it. When an app builder knows which function fits each need and which mistakes cause errors, they can turn picklist choices into calculations, labels, and checks.

Why picklist fields need special functions

Picklist values are stored differently than other field types. Because of that, most formula functions and standard comparison operators, such as = or !=, cause errors on a picklist field. For example, the first line below causes an error, and the second line is the fix.

Status__c = "Open"            // Error: Picklist fields are only supported in certain functions
ISPICKVAL(Status__c, "Open")  // The fix

To reference a single-select picklist, use only ISPICKVAL, CASE, or TEXT.

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.