0

I'm creating a screen flow with a complex set of dependent picklists. I'm trying to figure out how to display them all, but the Dependent Picklist component is very limited.

The standard component can link up to 3 dependent picklists, but the 1st must be a parent to the 2nd, and the 2nd must be a parent to the 3rd.

My situation is that I have 1 picklist that is a parent to 4 others. And I have another picklist that's a parent to 7 others (it's also a child to the first picklist.)

Dependent Picklists

If I want to display them all, I would need to create 4 separate dependent picklist components for the first parent and 7 for the second parent. This would mean that the parent is shown as an input field multiple times on the screen, which is very messy.

I could use a separate screen for each dependency, but the parent would still be editable on every screen, which could result in incompatible field choices on previous screens. I can't see a way to stop them from editing the a parent every time except adding a decision after every screen to see if they changed it and redirect them back to the screen if so.

Does anyone have ideas about how to make this cleaner?

1
  • 1
    The only way you're going to get this to work without all the mess, I believe, is a custom LWC/Aura component that you can drop in the flow.
    – sfdcfox
    Apr 13, 2022 at 19:06

1 Answer 1

1

This is what I ended up doing:

  1. I used dependent picklist for three of the fields that were in a parent/child hierarchy.
  2. For the other fields, I created regular picklists on the screen that pull in the field's picklist values via Choice Sets. Many of the fields use the same picklist values regardless of which parent value is related to it, so I added visibility criteria to these dependent picklist so they only show up when certain values are chosen for their parent fields.
  3. There was one field left over that had different picklist values depending on the parent values, so #2 wouldn't work. There were four different combinations of picklist values for all of the parent values. I ended up creating individual Choice variables for all of that picklist values. Then I had to create four separate picklist fields for that one child field and assign the correct choice variables to each one. I used visibility criteria on the screen to show the right field based on the parent field's choice. Finally, I created a formula that pulls in whichever field was populated and mapped it to the new record.

It's not the cleanest, but I got it all on one screen. This really only works because the picklist values won't change much (or at all) over time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .