Flow: How To Use “Choice”

Choice is a resource type and it is only available in Screen flow, and it can only be used in the specific inputs on a Screen component, namely Checkbox Group, Radio Buttons, Picklist, Multi-Select Picklist, and Dependent Picklists. (What to learn about all the inputs on Screen component? Check here)

There are three types of Choice – Choice, Record Choice Set, and Picklist Choice Set. Let’s go through how each of them works.

1: Choice

flow choice

Essentially, the purpose of having a choice is that you can let it display one value, but represents another one. For example, you can let the choice shows a sentence like below:

flow choice label

But assign the value as True:

Choice data type

So once an user chooses this choice, the value will be registered as True, instead of “I want to sign up for the blog”.

There are five data types for choice, and for text type, you can even display a text input for users to enter the value, like “Other” option for example.

After you create all the choices, putting them all into the screen component.

2: Picklist Choice Set

flow choice - Picklist choice set

As you might have noticed, if you use the “choice” resource, you will have to create them one by one. When you want to show many options, this will take a considerate amount of time. This is when the choice set can help.

If the options are exactly the same as one of your picklist field, you can use the picklist choice set to get those values as a choice resource. Simply choose the right object, the data type of the existing field (either regular or multi-select picklist), and the target field.

flow choice - Picklist choice set

Then instead of putting several choices in the component, you only need to put one choice set.

3: Record Choice Set

flow choice - record choice set

Record choice set is an interesting resource. It consists of three steps:

  1. Get all the records that meet certain criteria
  2. Choose one field and make a choice set of the values of that field of all selected records from step 1
  3. If a record is chosen by user, store more fields of that record

It might sounds a bit complex, so let’s use an example:

To get all the accounts owned by me (step 1), and use the account name of those accounts as choice set (step 2). If an account is chosen, I want to save the website and email as well (step 3).

Step 1
flow choice - record choice set
Step 2
flow choice - record choice set
Choice Label is what your end users will see for each option. Choice Value is what will be saved after an option is chosen.
Ex. If Label = Name, Value = Id, If your user chooses Account 1, the Id of Account 1 will be saved.
Step 3
flow choice - record choice set
Result
Check Out How Choice Can Be Used In Real Cases!
No posts found.

Official Salesforce Help Article On Choice

Subscribe
Notify of
guest

13 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Rachel

How does one validate the input text? When a certain choice is chosen, I would like to require that the user enter a number. Thanks!

Shan

This is great, I would like to understand when you have Multiple Options enabled in the Record choice list. How do you show them ?
Bcz, when Multiple Options is enabled, the recordchoice set stores the recent record id only not all records Id.
Any suggestions on this ?

Neil

I think Shan is asking (with regard to Record Choice Sets) how do you access the multiple record IDs if “multiple options” is enabled on the Picklist or Radio Buttons screen component. But it appears only ONE record is retained with a choice set. Is that correct? See screenshot.

Screenshot 2022-03-31 231131 FLOW.png
RealWorld

How can we disable Radio Buttons?

Hari

How can i Extract Choice set Label in other screen.By Selection of Radiobutton ,picklist ,we can get Value by Using that API name,but how can i get that Picklist/Radio button selected choice Label?

Sandy

How do you only display the picklist choices if there are different choices available based on a record type?

Bivush

Exactly, This is a much needed feature and only works in the Desktop version of “normal” screen flows. Not the FSL flows which im trying to do. Basically. i have 4 RTs of Case in my org and i just want the picklists to filter based on the RTs. smh.

Sudhakar

How can i perform this action in single screen

Eliza Popescu

Is there a way that after I count records, and the count =3, that I can automate the creation of a choice set where I would get a picklist with 1,2,3 as values that I can choose from? And if my record count is 2, than I have just 1 and 2 as options in my picklist choice set?