web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Reset Gallery and Filt...
Power Apps
Answered

Reset Gallery and Filters (Scrolling Issue)

(0) ShareShare
ReportReport
Posted on by 127

Hi! I have a Canvas Power App with a Gallery in. The gallery is scrollable and I have 2 fields which control the filters.

I want the gallery to reset and scroll to the top and then filters to reset when I leave and then come back to the screen

 

On the Screen's OnVisible property, I tried:

Reset(Gallery2);
Reset(Dropdown1);
Reset(TextInput3);

 

I tested this when the filters were blank and the gallery was scrolled down and it worked. But when I tested it by applying the filters and then returned to the screen, the gallery was scrolled to the bottom.

 

I then tried to apply {} to the Default Property in the Gallery. Now I have the opposite problem. When the filters were blank and the gallery was scrolled down, the gallery remains scrolled down when I return to the screen. But when I tested it by applying the filters and then returned to the screen, the gallery was scrolled to the top and the filters reset.

 

For good measure I have also put the below on the OnSelect Property on the Home icon with no success

Navigate(Home); Reset(Gallery2);
Reset(Dropdown1);
Reset(TextInput3);

 

Can anyone help me?

 

 

Categories:
I have the same question (0)
  • SBax Profile Picture
    1,348 on at

    Is the issue maybe a result of the order of your resets?

     

    Try doing the reset(gallery2) as the third step (as opposed to first step)

  • VictorTek Profile Picture
    127 on at

    @SBax  - it didn't work 😞 Here is the problem with visuals:

    VictorTek_2-1678884488035.png

     

    VictorTek_1-1678884467483.png

     

    VictorTek_5-1678884549306.png

     

    VictorTek_6-1678884569457.png

     

    VictorTek_7-1678884596652.png

     

    VictorTek_8-1678884620154.png

     

    VictorTek_9-1678884665465.png

     

    VictorTek_11-1678884731574.png

     

  • SBax Profile Picture
    1,348 on at

    Is your gallery coming straight from the datasource or via a collection? 

  • VictorTek Profile Picture
    127 on at

    Hi! Straight out of a SharePoint List data source

  • Verified answer
    adedapo Profile Picture
    256 on at
    Screen.OnVisible = UpdateContext({_selectedItem: First(Your_DataSource)});
    Gallery.Default = _selectedItem
  • VictorTek Profile Picture
    127 on at

    Thanks but that resets the gallery to the first ID item rather than the first name in List Column 1. Here is the SharePoint list. It is worth mentioning I want the view to default to the first name alphabetically. For example the first name alphabetically is Andy, and so it should default to Andy, but next week a new name could be added (eg Adam) and then the gallery view should default automatically to Adam.

     

    VictorTek_0-1678902748387.png

     

  • Verified answer
    SBax Profile Picture
    1,348 on at

    All you need to do is add a sort by columns before your "first" and sort by first name

     

    UpdateContext(

    {_selectedItem:

    First(

    SortByColumns(

    Your_DataSource,

    Your_firstnamefield, 

    SortOrder.Ascending

    )

    }

    );

     

  • VictorTek Profile Picture
    127 on at

    Thanks @SBax and @adedapo 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 428

#2
Haque Profile Picture

Haque 338

#3
timl Profile Picture

timl 333 Super User 2026 Season 1

Last 30 days Overall leaderboard