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

Default choices based on dynamic values (variables)

For example if you are using a visual flow to do some data maintenance task - e.g. updating contact details.

You want to ask the user to update fields like the Department, but you want to default the choice to display the existing value from the contact record.

At the moment you can only default it to a static choice.  I would like to be able to default it to the value of a lookup variable, so that the user can see the department is currently 'Sales' or whatever.

(The workaround I have found so far is to have n versions of the screen - with each one having the department defaulting to one of the n possible values - i.e. one for 'Sales', one for 'Finance', etc.  and a decision step to decide which screen to show. This is 'ok' for a small number of choices, but un-manageable for picklists with more than a few options)


(NB - this is a copy of an Idea that I created earlier


This is on the roadmap of features where you want to set the default value to be set by a merge field. Not sure when though to be honest!


Agreed. I need this.


I have the same problem. +1 to your post.


By the way, if you allow it to have duplicated choices, you kinda can do it.


1) Get the existing data from database or somewhere else, and put it to variable (e.g. vData)

2) Create a choice with Label = the value (e.g. {!vData}), value = the value (vData)

3) Add the choice in your picklist, and select it as "default".


This allows you to set the existing value as default, but there is always the same option in the other options. The flow doesn't eliminate duplicated options, so it shows 1 set of duplicated options with the default.

Paul BateyPaul Batey