Loading
Salesforce now sends email only from verified domains. Read More
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Tips for Working with Picklist and Multi-Select Picklist Values in Formulas

          Tips for Working with Picklist and Multi-Select Picklist Values in Formulas

          Get tips on building formulas that reference values from picklist and multi-select picklists. Plus, find guidance on working with boolean checkbox fields and dealing with common errors.

          Required Editions

          Available in: both Lightning Experience and Salesforce Classic
          Available in: all editions

          Because Salesforce stores picklist values differently than other field types, working with these values in formulas requires specialized functions. Using most formula functions or standard comparison operators (such as = or !=) results in errors.

          Picklists

          To reference picklist values in formulas, use only these three functions.

          • ISPICKVAL: Determines whether a picklist field contains a specific value.
            • Example use case: Create a validation rule formula that shows an alert if a Case Status picklist equals Escalated.
          • CASE: Assigns a specific value to each option in your picklist.
            • Example use case: Calculate a Due Date formula field by assigning a numeric value to every option in a Priority picklist, where High converts to 1 day and Low converts to 7 days.
          • TEXT: Converts the selected value of a picklist into standard text, where the text is the value’s API name. After converting a picklist value to text, you can then combine it with other fields. Available only in flow formula resources, formula fields, validation rules, and workflow field updates.
            • Example use case: Create a unique record ID formula field by combining a Region picklist value with a Year field.

          For guidance on syntax for these functions, plus tips and examples, see ISPICKVAL, CASE, and TEXT.

          Multi-Select Picklists

          To reference multi-select picklist values in formulas, use only these functions.

          • INCLUDES: Checks whether a multi-select picklist contains a specific value (even if other values are also chosen).
            • Example use case: Create a formula field that automatically sets a checkbox return type (called VIP Member) when a user selects the Golf option in the Interests picklist.
          • ISBLANK: Checks if the user hasn’t selected any options in the picklist.
            • Example use case: Create a validation rule formula that prevents a user from saving a record when a multi-select picklist field is empty.
          • ISCHANGED: Checks if the user modified the list of picklist selections during the current edit session. Available only in assignment rules, validation rules, workflow field updates, and workflow rules that use the evaluation criteria: Evaluate the rule when a record is: created, and every time it’s edited.
            • Example use case: Create a validation rule formula that prevents users from changing the selections in an Approved Vendors picklist if the account is active.
          • PRIORVALUE: Checks what a picklist’s selections were before a user’s changes. Available only in assignment rules, validation rules, workflow field updates, and workflow rules that use the evaluation criteria: Evaluate the rule when a record is: created, and every time it’s edited.
            • Example use case: Create a validation rule formula that requires a user to provide a reason if they deselect the Critical option in the Tags picklist.

          These functions also apply for multi-select picklist values in formulas, but with some considerations.

          • CONTAINS: Checks if a specific text string appears anywhere within the selected values in a multi-select picklist. Works only in Process Builder or Flow formulas that use the Conditions are met criteria for running actions. It’s better to use INCLUDES instead.
            • Example use case: Create a Process Builder formula that triggers an action if any of the user’s selections in the Interests picklist contain the text Golf.

            This function matches partial words. In the example, if the user selects Mini-Golf, the formula triggers the action because that value includes the text “Golf.” Be careful with short words—searching for Ten matches both “Tennis” and “Tent.”

          • ISNULL: Checks if a field is empty. This function is old and doesn’t handle empty text fields or picklists well. Use ISBLANK for new formulas.

          For guidance on syntax for these functions, plus tips and examples, see INCLUDES, ISBLANK, ISCHANGED, PRIORVALUE, CONTAINS, and ISNULL.

          Standard Checkbox Fields (Booleans)

          Some standard objects include special checkbox fields (booleans) that summarize a record’s status. For example: IsEscalated on Cases, IsWon and IsClosed on Opportunities, IsClosed on Tasks and Events, and IsConverted on Leads.

          These fields aren’t picklists. While they relate to status, they’re actually checkboxes that hold a TRUE or FALSE value. The system manages these checkboxes. You can use these fields directly on formulas without the specialized functions, such as ISPICKVAL, that picklists require. For example, to identify a closed opportunity, you can simply use:

          IsClosed = TRUE

          When building formulas based on status, check whether a standard checkbox field such as IsWon does what you need. It’s often simpler than writing a complex logic statement for a picklist field such as StageName.

          Troubleshooting Common Errors When Referencing Picklist Values in Formulas

          • Error: Picklist fields are only supported in certain functions
            • Likely Cause: You tried to compare a picklist field directly to text (for example, Status = "Open" or used a math or text function not meant for picklists.
            • Solution: Replace direct comparisons with ISPICKVAL.
              • Incorrect: Status__c = “Open"
              • Correct: ISPICKVAL( Status__c, "Open" )
          • Error: Incorrect number of parameters for function ‘ISPICKVAL()’ or generic syntax errors
            • Likely Cause: You included an equals sign (=) inside the parentheses.
            • Solution: Use a comma to separate the field from the value.
              • Incorrect: ISPICKVAL( Status__c = "Open" )
              • Correct: ISPICKVAL( Status__c, "Open" )
          • Error: Formula is valid but doesn’t work (returns FALSE when it should be TRUE)
            • Likely Cause: You used the picklist label (what the user sees) instead of the API name (what the system uses). Picklist labels are often different from the underlying API name.
            • Solution: Check the picklist values in the field settings and make sure that your formula uses the exact API name (for example, In_Progress instead of In Progress).

          Get More Information

           
          Loading
          Salesforce Help | Article