Get Started with Picklists
- Decide when to add a picklist field.
- Decide which type of picklist you need.
- Create a custom picklist.
When to Use a Picklist
When you’re at a bakery ordering cookies, you want to know what kinds of cookies they have instead of just guessing what to order.
Picklists are menus that expand to give users choices. I’m sure you’ve seen picklists, and probably even created a few by now.
Picklists help simplify data entry and standardize values. They guide users to the values they need and make data entry quick. They’re not ideal for long entries, or values that are unique. For example, picklists are great for selecting a cookie, not so great for a customer’s street address or last name.
We have more than one type of picklist. You’re here to learn which type is best for your use case.
So, let’s get to know your picklists.
Anatomy of a Picklist
Picklists have two parts.
The field (1) defines the type of picklist. Can users select more than one value? Is this field dependent on another field for its value set? You set those options, and more, at the field level.
The value set (2) defines the choices a user sees, their order and the default value, and other settings.
Pretty basic, but this is an important distinction. You manage these two parts separately. For now, we focus on the field. In the next unit, you focus on the values.
- Custom Multi-Select
- Dependent or Controlling
- Set individual values when you create the picklist. These are specific to a single picklist field.
- Use the built-in set of values for the standard picklist fields that come with your Salesforce org.
- Create a global value set. A global value set is a custom set of values you create to share with more than one picklist field.
Let’s take a look at the different varieties of picklist fields. We cover values in a later unit.
Standard picklists are the ones that are included in your Salesforce org before any customization. Examples include the Lead Source picklist on the Lead object, the Opportunity Stage picklist on the Opportunity object, and others.
Standard picklist fields are included for the common fields you likely want on standard objects that come with your org.
Standard picklist fields sometimes share a standard value set. For example, on the Lead object, the Lead Source picklist values are part of a standard value set. The same values are also used on the Account object for the Account Source picklist field. When you change a value from that set in the Lead Source picklist settings, the change also appears in the Account Source picklist field values.
For more flexibility, you need a custom picklist field.
Custom picklists are the ones you create. You can add your own values and configure a custom picklist’s behavior. As you create a new custom field, select Picklist as the field type.
Here are the steps to create a custom picklist. You can do more customization later.
- In Setup, click the Object Manager tab, and then select the object to contain the picklist field.
- Click Fields & Relationships.
- Click New. Select Picklist, and then click Next.
- Enter a Label for the picklist field. The Field Name is automatically assigned. The Field Name is often also called the “API name” since it’s a way to reference the field programmatically.
- Select Enter values, with each value separated by a new line.
- Enter your values.
- Optionally, sort the values alphabetically or use the first value in the list as the default value, or both. If you select both options, Salesforce alphabetizes the entries and then sets the first alphabetized value as the default. You can use a formula to assign a default value dynamically. We get into that later.
- Choose whether to restrict this picklist’s values to an admin-approved list. This is where you can decide this should be a restricted picklist. You can change it later if you find that you do need to accept new values in the field.
- Click Next.
- Set field-level security for the picklist field, and then click Next. This list determines who can see or edit the field.
- Choose the page layouts on which to include the picklist field.
- Click Save.
Identify existing custom picklists on an object’s Fields & Relationships page. Like other custom fields, a custom picklist’s Field Name ends with __c.
Custom Multi-Select Picklists
When you create a custom picklist, notice the Picklist (Multi-Select) option, too.
Pick this option if you want your users to select more than one value from the picklist. When a user picks more than one value, the selected values show in the field, separated by a semicolon.
Do they have to select more than one value? No. They can select only one. Now, you’re probably thinking “Then, why don’t I always use a multi-select picklist?” And, that’s in case you want to restrict users to only one value. So, just remember:
- Picklist: Only one value at a time. Sometimes that’s a good thing.
- Multi-Select Picklist: One or more values at a time.
Also, consider the following:
- Multi-select picklists have a lower limit on total values. See Picklist Limitations for more information.
- You can convert a custom picklist to a multi-select picklist to support multiple values in the field, later. However, when you convert a multi-select picklist to a picklist field that doesn’t support multi-select, Salesforce clears the values for that field on existing records. The new field only allows one value.
- Reports referencing multi-select picklists should use contains or includes (not equals) to collect all results that contain more than one value.
- In report results, or dashboards, multi-select picklist selections are grouped independently. For example: One record has a, b, and c values. Another record has b and c values. And another record has only c selected. You’ll get three different groupings: one for a;b;c, one for b;c and another for c.
- Only specific functions can reference multi-select picklists in formulas. See Tips for Working with Picklist and Multi-Select Picklist Formula Fields for more information.
Restricted picklists keep users from adding new values (either through the API or other apps). This restriction is useful for keeping your data consistent. Imagine someone working in an app that loads data into your picklist and entering a typo into the list (for example, Vamilla).
If you don’t restrict the values on a picklist, you can get records with values like “Vamilla” instead of “Vanilla” or added values you just don’t want to see. With a restricted picklist, your picklist data stays clean.
Admins with the permission to edit the field can continue to add and edit values.
You set a restricted picklist when you select the Restrict picklist to the values defined in the value set option when you create a custom picklist. When you set a picklist to be unrestricted, users can't enter new values through the user interface, but they can add new values via the API, automation, or other apps.
To change this setting on an existing picklist:
- Go to the picklist detail page and select Edit.
- Select Restrict picklist to the values defined in the value set.
- Click Save.
Guide users, save UI space, and further improve data integrity with a dependent picklist. A dependent picklist filters values for one picklist based on a selection from another picklist or a checkbox (the controlling value) on the same record.
Say your bakery has a hundred different kinds of cookies, and you want to guide customers with gluten or nut allergies to cookies that don’t have gluten or nuts. Create a controlling picklist for preferences to select “all” , “gluten-free” or “nut-free”. Then, set the cookie flavor picklist as a dependent picklist of the preference picklist. When someone selects “gluten-free” the cookie flavor picklist shows only the gluten-free flavors.
We cover how to set a dependent picklist in the next unit.
Compare Picklist Fields
Consider printing this, laminating it, hanging it on your wall.
|Standard Picklist||Custom Picklist||Custom Multi-Select Picklist|
|Add/Remove from Page Layouts|
|Delete from Your Org|
|Set a Default Value|
|Use a Formula for a Default Value|
|Can Select Multiple Values|
|Can Add Values via Apps or API|
|Can Be Restricted|
|Can Be a Dependent Picklist|
That covers the picklist field types and properties. In the next unit, you focus on the things you can do with the picklist’s values.