Skip to main content

How to Add a Combo Box That Allows One Choice in Power Apps

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

The modern Combo box lists options for people to pick from. It allows several choices and a search box by default, so for a short list where one answer is right, turn both off. Then read the answer from Selected.

Prerequisites​

Step 1: Insert the Combo Box​

Select the container it should go in, then Insert → Input → Combobox. Rename it, for example cmbLevelCS (How to Rename a Screen or Control). Its defaults were:

PropertyDefault
ItemsComboBoxSample
ItemDisplayTextThisItem.Value1
SelectMultipletrue
IsSearchabletrue
InputTextPlaceholder"Find items"
Width, Height320, 32
AccessibleLabelempty

In a container, it lands at the end. Move it where it belongs with Reorder (How to Reorder Controls in a Container).

Step 2: Give It Its Options​

PropertyValue
ItemsLevelOptions
ItemDisplayTextThisItem.Value

ItemDisplayText is the text each option shows. LevelOptions has one column, Value:

The formula bar with the combo box's Items set to LevelOptions and the strip showing LevelOptions, Data type: Table

PropertyValue
SelectMultiplefalse
IsSearchablefalse

Microsoft's Combo box modern control reference says SelectMultiple now defaults to true, so an app that needs one choice must set it to false. With IsSearchable off, the control works like a simple drop-down, which suits four options.

Step 4: Add a Placeholder and a Label​

PropertyValue
InputTextPlaceholder"Choose a level"
AccessibleLabel"Level"
Height40

The reference asks for an AccessibleLabel that describes what the control is for, not the current choice. A visible label above it helps everyone else (How to Add a Text Control).

Step 5: Read the Choice​

With SelectMultiple off, Selected is the chosen option as a record:

The chosen level
cmbLevelCS.Selected.Value

Until something is chosen, Selected is blank. The example's Save button stays disabled until there's a name and a level (How to Disable a Button Until a Text Box Has Text):

btnSaveCS → DisplayMode
If(locIsSaving || IsBlank(Trim(txtNameCS.Text)) || IsBlank(cmbLevelCS.Selected), DisplayMode.Disabled, DisplayMode.Edit)

Step 6: Start on a Saved Value​

When the screen edits an existing item, the combo box should start on its level. DefaultSelectedItems must be a table of records from Items, so filter the options:

cmbLevelCS → DefaultSelectedItems
Filter(LevelOptions, Value = locCompetency.Level.Value)

When there's no item, as when adding a new one, the filter returns an empty table and nothing is chosen. The screen's loading formula calls Reset(cmbLevelCS) after loading the item, so the control goes back to its default each time the screen opens (How to Reset a Control to Its Default Value).

The Result​

The Add competency screen with Negotiation typed as the name and the Level combo box open below it, listing Beginner, Intermediate, Advanced and Expert

Common Mistakes​

MistakeWhat happensDo this instead
Leaving SelectMultiple onPeople can pick several levelsSet it to false
A record in DefaultSelectedItemsThe default doesn't applyA table from Items, such as Filter(...)
Using cmbLevelCS.Selected where text is expectedIt's a record, not textRead .Value

Troubleshooting​

SymptomLikely causeFix
The options aren't yoursItems is still ComboBoxSampleSet Items to your table
The options are blankItemDisplayText reads Value1ThisItem.Value
The previous choice shows when the screen opens againThe control wasn't resetReset it in the screen's loading formula

FAQ​

What's the difference between Selected and SelectedItems?​

SelectedItems is a table of every chosen option. Selected is one record: the choice when SelectMultiple is off, or the first choice when it's on.

Should I use the Dropdown control instead?​

The Insert pane lists both. The example uses the Combo box because its reference documents single selection, defaults and Reset, which is everything this screen needs.

Conclusion​

Insert Combobox, set Items and ItemDisplayText, turn off SelectMultiple and IsSearchable, start it with DefaultSelectedItems, and read the answer from Selected.Value.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.