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 / Prevent gallery jumpin...
Power Apps
Answered

Prevent gallery jumping to top when refreshing large delegated data source

(0) ShareShare
ReportReport
Posted on by 35

Hi,

I have a gallery displaying a list of a large number of items, that is connected to a SQL server view and fully delegable (tested with over 2000 items in production system). The user is able to select an item from the list and go to a new screen which displays more detail and allows editing of some data. When the user returns to the list/gallery using a back button the gallery content is automatically refreshed/reloaded (as I am refreshing the data source) and the gallery scrolled to what seems to be the top of the nearest 'chunk' of data (e.g. If user had scrolled to item 215, viewed and then returned to the list, the list would refresh and autoscroll back to item 200, not 215). This is causing frustration with our users as they tend to use the list as a way of working through items (top - down).

Is this expected behaviour? If so, is there any way to make sure the gallery returns to its previously scrolled position, even after the data source has been refreshed?

 

Thanks

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Tricky :

    Sorry, I’m afraid there is no setting that can directly achieve this requirement.

    But you could try this workaround:

    I assume that your List has an 'ID' column of int type that automatically grows in steps of 1 (1, 2, 3, 4, 5...)

    1\I assume that the Gallery only displays 3 records at a time

    2\Add a UP arrow and set it's OnSelelct property to:

    If(ScrollNo>=1,Set(ScrollNo,ScrollNo-1)) /*ScrollNo is my custom variable*/

    3\Add a Down arrow and set it's OnSelect property to:

    Set(ScrollNo,ScrollNo+1)

    4\Set the gallery's items property to:

    Filter(TheDataSource,ID<=ScrollNo*3 && ID>(ScrollNo*3-3)) /*This solution only displays 3 items per page, you can change 3 to 10 or 20*/

    vbofengmsft_0-1636340420996.gif

    Best Regards,

    Bof

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard