How do Dependent Picklists guide user data entry by filtering options based on controlling field values?
Answer
Basics: It prevents impossible combinations such as Country = India with State = Texas. The controlling field is a standard or custom picklist or checkbox; the dependent field must be a custom picklist (standard picklists cannot be dependent fields, though many can be controlling).
How it works:
- Setup > Object Manager > object > Fields & Relationships > Field Dependencies > New.
- Select Controlling Field and Dependent Field.
- In the matrix, select values of the dependent field and click Include Values for each controlling value; Preview to test.
- Add both fields to the page layout (or record page) so users can interact.
- For record types, ensure the chosen values are also available in the record type picklist assignments.
Advanced / deep dive: The dependent field is disabled until the controlling field has a value. A dependent picklist can also be a controlling field for another, so you can chain Country, State, City, but keep depth small. The controlling field is limited in values (around 300; verify) and dependent fields store a bitmap-style "valid for" definition. Global Value Sets can supply values to multiple fields consistently. Dependency enforcement is a UI behavior; saving via API or Apex does not always reject invalid combinations (especially when the field is not restricted), so add a validation rule or trigger check when data integrity matters. Changing the controlling value in the UI clears the dependent value, but integrations may leave stale combinations. In LWC, getPicklistValues from lightning/uiObjectInfoApi returns controllerValues and validFor indexes for the dependent field, so you can build custom dependent controls. Dynamic Forms and Flow Screen picklists also honor dependencies. State and Country picklists (standard address) are a separate feature that handles ISO codes.