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 / Nested gallery - Perfo...
Power Apps
Answered

Nested gallery - Performance issues (Laggy update)

(0) ShareShare
ReportReport
Posted on by 24

My app uses a nested gallery in order to group items by category. The issue I'm having is that each time the user edit a record the nested gallery reloads. This takes time and makes the app seem broken and slow. 

 

Untitled.png

 

More info

The app is made in PowerApps for Teams.

 

The main gallery is named Gallery1 and has items:

 

 

GroupBy(localAnsCollection, "localQuestionCategory", "GrpByCategory")

 

 

 

The nested gallery SubGallery has items:

 

 

ThisItem.GrpByCategory

 

 

 

Inside SubGallery I have placed buttons that patch the source localAnsCollection. Each time a button is pressed the app execute a lookup-function and a patch-function on the source:

 

 

If(
 Text(ThisItem.localAnswerEK) = "OK",
 Patch(
 localAnsCollection,
 ThisItem,
 {
 localAnswerEK: LookUp(
 Choices(ThisItem.localAnswerEK),
 Text(Value) = "IR"
 ).Value
 }
 ),
 ...
)

 

 

 

The app is made to fill checklists/Check-forms and the collection localAnsCollection is deleted after the user exit the current view. 

 

I have tried to find out why it behaves badly. It seems like it's not the process above (looking and patching) that takes a lot of time, but reloading/reordering the galleries with their updated records. Any suggestions to fix this?

 

I don't need the records in my collection to be updated immediately after a button is pressed, but the button texts must change. Is there any way to store data in each button instance in the gallery and not patch the source until the user exit the current view? 

Categories:
  • Verified answer
    Scott_Parker Profile Picture
    1,090 on at

    Unfortunately, can't add custom components to a gallery. If you could, you could make your state-saving button like you're proposing. I couldn't figure out a good way to use a button control to store a value specific to a gallery item on the control.

     

    There are state saving controls like comboboxes, dropdowns and toggles. You could use a toggle control instead of a button. If you don't want the user to be able to toggle it off/on freely, you could set the disabled property to depend on Self.Value. If aesthetics is a problem, you make it transparent and overlay the toggle on a button.

  • BGR_ Profile Picture
    24 on at

    Thank you for the suggestion. I avoided using nested galleries altogether, but I believe using state-saving controls would also work. 

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard