Search Large Lists in a Combobox
Let users find one account among thousands by typing a few letters, with a Combobox that queries Salesforce on each search instead of loading every record.
A support agent logging a case needs the customer's account, and the org holds tens of thousands of them, far too many to scroll. With a Query data source and search turned on, the agent types "burl", the Combobox asks Salesforce for matching accounts, and shows a short list with the city under each name.

Before you start
A screen flow with an Avonni Combobox on a screen.
Users who run the flow can read the Account records they need to find. The query runs with their access unless System Mode is on.
Steps
Query the accounts
Open the Edit Combobox Component panel and, at the bottom of the Properties tab, set Data Source to Query.
Select the Account object.
Add Filters only if the list must be narrower, for example Type Equals
Customer - Direct.Leave Maximum Number of Records empty to let the search reach every account. A number here caps how many records the Combobox loads in total.

Map the fields people search on
In Data Mappings:
Label:
Name.Value:
Id, so the selection is the account Id that the rest of the flow needs.Secondary Text:
BillingCity, so two accounts with the same name can be told apart.Avatar: an Icon Name such as
standard:account.
The search looks only in the mapped fields. Here, typing a name or a city both work.
Turn on search
Turn on Show Search.
Turn on Hide Options Until Search. The dropdown stays empty until the agent types, and nothing is queried before that.
Set Dropdown Length to 10 Items. With Hide Options Until Search, it is also the number of matches each search returns.
Set a Placeholder that says what to type, such as
Type an account name or a city.
Hide Options Until Search off
Hide Options Until Search on
When the dropdown opens
The first records, more load as the user scrolls
Nothing until the user types
When the user types
A new query with the search term
A new query with the search term
Matches shown
All, loaded as the user scrolls
Up to Dropdown Length (5, 7, or 10)
Best for
A few hundred records people browse
Thousands of records people look up by name
Save and test
Save the flow and click Debug. Click the Combobox: the dropdown shows no account yet. Type burl: after a moment, up to ten accounts whose name or billing city contains "burl" appear, each with its city underneath. Pick one. The Value output holds its Id and Selected Option holds the account record.
Test the search in the debug run. The Component Builder preview of a Query Combobox ignores filters and search, and shows at most 20 records.
Troubleshooting
Related tutorials
Build Combobox Options: when the options are a short list rather than records.
Add a Create New Action to a Combobox: let the agent create the account when the search finds nothing.
Use a Combobox Selection in a Query or Flow: pass the picked account Id to a Get Records or a subflow.
Was this helpful?
