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

Limit and pre-select Visual Picker choices

Let users pick several Visual Picker cards in a screen flow, between a minimum and a maximum, with one card already selected when the screen opens.

A customer success rep plans a new customer's onboarding. The package includes two to three training modules, and every customer gets Account Setup. The screen shows the five modules as cards, starts with Account Setup ticked, stops the rep at three, and refuses to continue with fewer than two.

Visual Picker with five onboarding module cards, three ticked and the other two greyed out because the maximum is reached
At three picks, the remaining modules are locked.

Before you start

Steps

1

Add the five modules

Open a Screen element, drag the Avonni Visual Picker onto it and give it the API Name Onboarding_Modules. In the Properties tab, set Label to Onboarding modules (2 to 3).

Set Data Source to Manual and add five Items:

Figure Title

Value

Account Setup

account-setup

Data Import

data-import

Reports and Dashboards

reports

Mobile App

mobile

Integrations

integrations

Card titles do not wrap: a long one is cut with an ellipsis. Set Size to X-Large and Ratio to 16-by-9 so "Reports and Dashboards" fits.

2

Allow several picks

Set Type to Checkbox. With the default, Radio, a second click replaces the first pick.

Switching to Checkbox also swaps Value for Value Collection in the panel, and adds Min and Max.

3

Pre-select Account Setup

In Value Collection, add one entry: account-setup. The screen opens with that card already ticked. The rep can still untick it. If the rep leaves it as is, it still reaches the Value output after Next.

Enter the item's Value, not its title. To pre-select from data instead, map Value Collection to a Text collection variable.

4

Set the minimum and the maximum

The panel has two Advanced Options toggles: the first opens the image settings. Click the second one to show Min and Max:

  • Min: 2. With fewer picks, Next shows an error under the picker and the flow stays on the screen.

  • Max: 3. Once three cards are ticked, the other cards are disabled until the rep unticks one.

Visual Picker properties with Type set to Checkbox, Value Collection holding account-setup, and Advanced Options open with Min 2 and Max 3
Checkbox, one pre-selected value, and Min and Max under Advanced Options.

The pre-selected card counts. Account Setup plus one more already meets the minimum.

5

Decide whether you need Required

Required blocks Next when nothing is picked. Here Min 2 already blocks an empty selection, so leave Required off.

Turn on Required when one pick is enough and you set no Min.

6

Read the picks after the screen

Two outputs carry the selection:

  • Value Collection: a Text collection, one entry per ticked card. Loop over {!Onboarding_Modules.valueCollection} to create one record per module.

  • Value: the same values in one text, separated by semicolons (account-setup;reports). This is the format of a multi-select picklist field. See Save multiple picks to a picklist field.

7

Save and test

Save the flow and click Debug. Account Setup is ticked when the screen opens. Tick Reports and Dashboards and Mobile App: the two remaining cards turn gray and can't be clicked.

Untick Mobile App: they come back. Leave only Account Setup ticked and click Next: an error appears under the picker and the flow does not move on.

Troubleshooting

Min and Max are not in the panel

Type is still Radio. Both settings exist only for Checkbox. Once Type is Checkbox, look under Advanced Options.

No card is pre-selected

Value Collection holds the card's title (Account Setup) instead of its Value (account-setup). The picker matches on Value only.

With Max at 1, a new click replaces the pick

That is how Max 1 works: the picker behaves like Radio, except that the rep can untick the card and leave the selection empty.

Was this helpful?