Using Custom Screen Components with Conditional Field Visibility to Create Dependent Picklist Combos
This scenario is common and powerful: you have a Flow Lightning Screen Component on the screen. Perhaps its an out-of-the-box component like Address or Lookup, or maybe it’s a custom component like QuickChoice. You want to have another component on that screen use conditional visibility and make the visibility dependent on the value of the selection in your first screen component.
This works really well, but there are a couple of little tricks that it helps to know about. The main thing to know is that outputs from Lightning Screen Components are only immediately available to the Conditional Field Visibility subsystem if you use the recently introduced Automatic Output Handling by clicking off the “Manually assigned Variables (Advanced)” checkbox.
This is necessary because the checkbox activates the older manual variable system, which doesn’t get updated with changed values until the Next/Finish button is clicked. When the checkbox is off, the new Automatic Output Handling is turned on, and conditional field visibility will work.
Here’s a video demo:
When you turn off this checkbox, (which is on by default in Spring ’20 for new components, but will be off by default starting in Summer ’20), you still won’t see the component show up in Set Component Visibility until you close and reopen the screen. At that point, you’ll be able to select the value from the parent screen component as an input into the visibility expression:
Theoretically, it should be possible to chain together a huge number of these….!