How to Set No Selected Item in a Power Apps Gallery?

When you add a Gallery in Power Apps, it automatically highlights the first item by default. That works in many cases, but it can be unclear if you’d prefer your app to start with nothing selected.

Yes, the same thing happened to me as well. In my case, I always want to start with my gallery with no selected item when I open the app.

In this Power Apps article, I will tell you how to set no selected item in a Power Apps gallery using the best five approaches.

Set No Selected Item in a Power Apps Gallery

Here represents all five different methods for setting no selected item in the Power Apps gallery. Such as:

  1. Make gallery default to blank
  2. Reset the gallery
  3. Use a Power Apps variable
  4. Use a Variable for the Selected Record (Form Binding)
  5. Conditional Selection

Let’s discuss one by one.

Method – 1: Use Default = Blank()

The easiest method to set a no-selection item in the gallery is to make the gallery’s default selection blank.

Select the Power Apps gallery and set its Default property as:

Blank()
How to Set No Selected Item in Power Apps Gallery

Method – 2: Reset the Gallery

Sometimes you need to clear the gallery after loading or after a specific action. For example,

  • When you navigate to the screen, the gallery should be cleared.
  • When moving between “Browse” and “Details” screens, the gallery should be cleared.

To achieve it, insert a Button and set its OnSelect property as : (Also, you can reset the gallery on the Screen’s OnVisible/App’s OnStart property)

Reset(gal_Tickets);
How to Set No Selected Item in a Power Apps Gallery

Method – 3: Use Power Apps Variable

The third approach to make the blank gallery selection is to use the Power Apps local variable. Follow the instructions below:

1. Go to the Screen’s OnVisible property and apply the code below:

UpdateContext({ varSelectedItem: Blank() })

varSelectedItem = Variable name

Set No Selected Item in Power Apps Gallery

2. Select the gallery and set its Default property as:

varSelectedItem
Set No Selected Item Power Apps Gallery

3. Next, set the gallery’s OnSelect property:

UpdateContext({ varSelectedItem: ThisItem })
Power Apps Gallery Set No Selected Item

4. Also, you can provide a button for users to deselect manually. Add a Clear selection button and set its OnSelect property:

UpdateContext({ varSelectedItem: Blank() })
set default selected item gallery power apps

Method – 4: Use a Variable for the Selected Record (Form Binding)

Suppose you are using a Power Apps form where a user can click on any item from the gallery, and the specific record details will appear in the form.

However, you want the gallery to have no selected item whenever a user opens the app, and the form to appear with empty fields. It should only update when the user clicks on any gallery record.

To do so, follow the steps below:

1. Set the Gallery’s OnSelect property:

Set(varSelectedRecord, ThisItem)

varSelectedRecord = Variable name

power apps gallery default no selection

2. Select the form and set its Item property:

varSelectedRecord
powerapps gallery default no selection

3. To clear the selection, add a button and set its OnSelect property:

Set(varSelectedRecord, Blank())
power apps gallery default no selection item

4. Now, save, publish, and play the app once. You can see that whenever you open the app, the form is empty by default, and no item is selected in the gallery.

Set No Selected Item in a Power Apps Gallery

5. Once you select any gallery record, the details will appear in the form as shown below. Also, you can clear or reset the form by clicking on the CLEAR button.

Set No Selected Item in a PowerApps Gallery

Method – 5: Conditional Selection

Suppose you want to make the Power Apps gallery blank selection in cases like,

  • If you’re in “New Form” mode → no item is selected.
  • Otherwise → the first item is selected by default.

To workaround this, set the gallery’s Default property as:

If(IsNewForm, Blank(), First(ColEmployees))

So by using all the above five approaches, we can make the Power Apps gallery selection blank. I hope this article helped you to learn how to set a non-selected item in a Power Apps gallery step by step.

Also, you can like some more Power Apps articles:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App