When a Power Apps screen opens, the gallery selects its first item by default. That’s rarely the one people need. In one app I built, managers wanted the Marketing team highlighted straight away, and after adding a new employee, they expected to see that person selected, not the top row.
In this tutorial, I’ll show you how to control which item a gallery selects with its Default property, with four examples: a fixed value, a record from a SharePoint list, the record a form just saved, and the item selected in another gallery.
Quick answer: Set the gallery’s Default property to a record from its Items, for example LookUp('Employee Details', 'Employee Department'.Value = "Marketing"). The gallery selects that item when the screen loads, and Gallery1.Selected returns it. To make the selection visible, set TemplateFill to If(ThisItem.IsSelected, Color.Goldenrod, Color.White).
How the Default property works
- Default is the record the gallery selects when the app starts. It must be a record from the gallery’s Items.
- Selected is the item that’s selected now, so other controls can read it.
Reset(Gallery1)goes back to the Default item, or to the first item if there’s no Default.
For the basics of the control, see how to use the gallery control in Power Apps.
Example 1: A fixed default item
I added a vertical gallery and set its Items to a simple list of products:
["Laptop", "Xbox Series S 1-TB", "Mouse", "Smartphone", "Headphones"]

A table written with square brackets has one column named Value. To select the Xbox by default, set the gallery’s Default to a record with that value:
{Value: "Xbox Series S 1-TB"}

The gallery selects the Xbox, but you can’t see it yet. Set TemplateFill so the selected row stands out:
If(ThisItem.IsSelected, Color.Goldenrod, Color.White)

Preview the app, and the Xbox row is highlighted as soon as the screen opens:


For more ways to show the selected row, see how to highlight the selected item in a gallery.
Example 2: A default item from a SharePoint list
Next, I used a SharePoint list named Employee Details with Employee ID (Title), Employee Name, Employee Department (choice) and Employee Joining Date. I added it as a data source:

Then I set the gallery’s Items to 'Employee Details':


To select the first Marketing employee by default, use LookUp, which returns a single record:
LookUp('Employee Details', 'Employee Department'.Value = "Marketing")

Because Employee Department is a choice column, you compare its Value. Use the same TemplateFill formula as before, with any color you like:


LookUp is delegable for SharePoint text, number and choice columns, so it works on big lists. To fetch a record by ID instead, see how to get a gallery item by ID.
Example 3: Select the item that was just submitted
On this screen, a form adds employees and a gallery lists them. After someone submits, they expect the gallery to select the new employee:


Set the Submit button’s OnSelect to SubmitForm(Form1). Then, in the form’s OnSuccess, store the saved record and clear the form:
Set(varLastEmployee, Form1.LastSubmit);
NewForm(Form1)
Form1.LastSubmit is the record SharePoint just saved, including its new ID. Now set the gallery’s Default to:
LookUp('Employee Details', ID = varLastEmployee.ID)


After a successful submit, the new employee is selected:

An older version of this post used the newest item in the list instead. That breaks when two people add employees at the same time, while LastSubmit always points to your own record. For validation before saving, see Power Apps form field validation on submit.
Example 4: Match the item selected in another gallery
Here, two galleries show the same employees, and selecting a person in the first one should select them in the second:



Set the second gallery’s Default to the matching record:
LookUp('Employee Details', Title = Gallery1.Selected.Title)


When the selection in Gallery1 changes, the Default changes, and the second gallery follows. For galleries inside galleries, see the Power Apps nested gallery guide.
Other handy defaults
First(Gallery1.AllItems)orLast(...)on the data source selects the first or last item.- To jump back to the default after a filter, run
Reset(Gallery1). See how to select the first item in a Power Apps gallery. - To read the selection in other controls, see how to get the selected value from a gallery.
Troubleshooting
- Nothing is selected: the Default record isn’t in Items. Check that you look up the same data source the gallery shows.
- The selection doesn’t show: set TemplateFill with ThisItem.IsSelected.
- The default doesn’t change after a new record: Default is applied when the value changes or the gallery is reset. Update the variable in OnSuccess, as in Example 3.
These Power Apps gallery tutorials go well with this one:
Frequently Asked Questions
How do I set the default selected item in a Power Apps gallery?
Set the gallery’s Default property to a record from its Items, such as a LookUp. Microsoft lists the property in its gallery control reference.
Why doesn’t my gallery highlight the default item?
The gallery selects it, but you need TemplateFill = If(ThisItem.IsSelected, …) to show it.
How do I select the record that a form just saved?
In the form’s OnSuccess, store Form1.LastSubmit in a variable, and set the gallery’s Default to a LookUp on its ID.
Is there a modern gallery control?
Not yet. The modern controls list has no gallery, so use the classic gallery with these properties.

Preeti Sahu is a Microsoft MVP for Power Apps with over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of the book Microsoft Power Platform: A Deep Dive. As a Power Platform developer, she has built various tools with Power Apps and Power Automate, and she makes Microsoft 365 videos for YouTube.