function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

dependent picklist to be set using visual flow

Dependent picklist to be set in a visual flowHi ,

Using a flow, I want to set the value of dependent picklist on setting a value of controlling field  I was expecting this to be pretty straight forward but this isn't working as I thought it will.
Ex: On selection of Country, automatically Country default shall be populated.
Country : UK, US, INDIA
County : London(default), Glasgow, California(default),Florida, Mumbai(Default), 

To achieve this i have a flow + made a config by which I have made the  dependent picklist as required. So each time the Country is selected-county is populated. THis works on UI but not with flows. Below is what is my observation:

a. From the UI: if a edit is made-- dependent picklist is getting set properly on selecting a value in country.
b.  If i try to replicate this in Visual Flow: It doesnot set dependent picklist-when the value of controlling field is updated.
I am assuming reason to be :  visual flow acts at business layer  so at this layer the required condition of pagelayout doesnt get implied. 

I would like to know what shall be the approach to populate this dependent picklist using visual flow.?

FYI,Below are the steps of the flow:

1. Query the record .
2. Set the value of the  field 'Country'  to UK
3. Expecting 'County' to be updated on its own to London. <---THis is not working using flow.

I was able to get this working on one screen in Flow using some JavaScript to show/hide the related child picklist based on a controlling field selection in flow.  Still had to break out the dependent picklist in a bunch of child picklists but with some Apex and supporting JavaScript/JQuery you can work around having to create child picklists and build the picklist on the fly based on controlling field change.

More info:
Here is the idea for upvoting:

User-added image