Dependent Picklists

The Symbiotic Relationship in Salesforce

Within the wild kingdom of Salesforce, there are fields that have symbiotic relationships with each other called Field Dependencies. They’re 2 fields that have a close union with each other where one field controls the other field. The Controlling field determines what values will appear on the Dependent field and it can be a picklist (standard or custom) or a checkbox data type. Multi-select picklist fields cannot be the Controlling field.

Controlling Field data types

Dependent fields can either be a Custom Picklist or a Multi-select picklist.

Dependent field data types

So why would you use Field Dependencies? Well, we live in a world of infinite choices — and that’s a great thing — but when you want to make a selection, you may want to have only relevant choices in order to be more efficient. Let’s pretend you’re starting a fish tank. There are a lot of fish to choose from so let’s narrow down the list. Is the tank salt water or fresh water? The Controlling field values should be fish type: Salt Water & Fresh Water. When you select Salt Water, then the Dependent field will only show fish types that live in salt water like clownfish (Nemo!), Humuhumunukunukuapuahaa, etc.

Hi, I’m Humuhumunukunukuapuahaa, but you can call me Humu.

So how do you build this? First, create the 2 picklist data type fields: Fish and Fish Name. When you create each field, you also create the picklist values.

“Fish” field has 2 values: Fresh Water & Salt Water

  • You can always add new values by clicking on the “New” button. You can “Reorder” the values too.

“Fish Name” field has 6 values that are types of either Fresh or Salt Water fish:

List of all fish (fresh water and salt water)

When you’re on Fields & Relationships, you can see all the fields available on the object. At the top right, click on Field Dependencies to link them the 2 fields we just created.

Click on New to define the new field dependencies

Select the Controlling field and the Dependent field from the drop down arrows. Then click Continue. Fish = Controlling field and Fish Name = Dependent field.

Here is where you specify which fish will appear when the “Fish” Controlling field is selected. In the Fresh Water column, select the values that you want to display when “Fresh Water” Fish is selected. Then click on Include Values.

In the Salt Water column, select the values that you want to display when “Salt Water” Fish is selected. Then click on Include Values.

See how the values are highlighted in yellow under each column? That means the dependent values have been selected for that controlling value (column header). When it’s all set up correctly, click on Save.

The user can select Fresh or Salt Water from the Fish field. And when the Salt Water value is selected, then Clown (Nemo!) value is available to choose.

So now that you know how controlling and dependent fields work, you’ll be on your way to create the most beautiful Salt Water aquarium! Join me next week to discover a new feature.

Mahalo,

Lizette

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Lizette CZ

Lizette CZ

Salesforce Magician + Home Chef Enthusiast + Fun Size = ME!