Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Keep Combobox Selections When Users Go Back

Keep what an agent picked in a Combobox when they click Previous or when a Decision sends them back to the screen, using a variable and the revisit setting.

A support agent picks the case priorities on the first screen, moves on, then clicks Previous to change something. Or a Decision sends them back because a required field is missing. Either way the agent expects their picks to still be there. Whether they are depends on one Flow Builder setting and on what the Combobox's Value is mapped to.

Priority combobox showing Medium and High selected from a flow variable
The Combobox shows the picks held in its variable.

Before you start

  • A Combobox with its options set up. See Build Combobox Options.

  • The Combobox's API Name. This page uses PriorityFilter, a multi-select Combobox on Case priorities.

What happens on a revisit

Flow Builder gives every screen component a revisit setting, in the component's Advanced section of the screen editor:

Revisit setting
What the Combobox shows when the agent comes back

Use values from when the user last visited this screen

The last selection. Flow restores the component's values.

Refresh inputs to incorporate changes elsewhere in the flow

Whatever its inputs say now. The selection comes back only if Value (or Value Collection) is mapped to a variable that holds it.

The first setting is enough when the agent only goes back and forth. Use the variable pattern below when a Decision loops back to the screen, or when a later step can change the selection, because the variable is then the one place that holds the current choice.

Steps

1

Create a variable for the selection

In Flow Builder, create a new resource: Resource Type Variable, API Name varPriorities, Data Type Text.

A Text variable works for single and multi-select comboboxes: Value holds a multi-selection as one text, separated by semicolons (Medium;High).

2

Map the Combobox Value to the variable

  1. Select the Combobox and open the Component Builder.

  2. In the Properties tab, map Value to {!varPriorities}. The field then shows its label, Var Priorities.

Combobox properties with Value mapped to the varPriorities variable
Value mapped to the variable that holds the selection.

Prefer a Text collection variable? Map Value Collection instead. It appears in the Properties tab once Is Multi Select is on.

3

Copy the selection into the variable after the screen

Add an Assignment right after the screen: {!varPriorities} Equals {!PriorityFilter.value}.

If a Decision loops back to the screen, the Assignment must run before the loop, so the variable holds the latest picks when the screen opens again.

4

Choose the revisit setting

Open the screen, select the Combobox, and in its Advanced section choose Refresh inputs to incorporate changes elsewhere in the flow. The Combobox now reads {!varPriorities} every time the screen opens.

Screen editor Advanced section with Refresh inputs to incorporate changes elsewhere in the flow selected
The revisit setting, in the component's Advanced section.
5

Save and test

Run the flow in Debug. Pick High and Medium, click Next, then Previous: both pills are still there. If your flow loops back through a Decision, trigger the loop and check the same.

Which output to store

Store Value: it is the format the Value input reads back. Value Collection Serialized (["Medium","High"]) and Value Comma Separated ('Medium','High') match no option, so mapping Value to either loses the selection or flags it as invalid. Use a Combobox Selection in a Query or Flow lists what each output holds.

Troubleshooting

After going back, the search returns too few results, or the Combobox shows "Attempt to de-reference a null object"

This affects a Query data source whose Filters compare a checkbox, number or date, or use the In operator. Before version 6.33, those filter values were lost on a revisit. Version 6.33 fixes it, but only once the flow is saved again: install 6.33 or later, open the flow, open the Combobox in the Component Builder, then save the flow as a new version and activate it.

The selection comes back but Selected Option is empty

With a Query data source on a large object (an account picker, say), when the picked record is not among the first 100 records the Combobox loads, Selected Option comes back empty on a revisit. Value and Value Collection still hold the record Id. Read the record from the Id instead: add a Get Records after the screen with Id In {!AccountPicker.valueCollection} (or Id Equals {!AccountPicker.value} for a single selection) and use that record in place of Selected Option.

Was this helpful?