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 / Gallery Items as Colle...
Power Apps
Answered

Gallery Items as Collection vs Dataverse Table - Performance Issues

(0) ShareShare
ReportReport
Posted on by 199

I posted in the community before about a very slow loading gallery when the Items are pointing to a Dataverse Table. The Table has 360 records and there are 75 custom columns associated with the records. The original resolution for the post was to create a collection with the data. I did that and the loading issue was solved.

 

Then I watched a video from Shane Young in which he had a connection to a Dataverse table with 20,000 records. His gallery does not seem to load slowly at all. So, I went into my app and changed a different gallery's Items to point to the Dataverse table instead of a Collection I made from the table. This caused the gallery to take an incredibly long time to load. We're talking several minutes. I got up from my computer for about 15 minutes, came back, and it was still loading. This other Dataverse table has almost 1,800 records and 29 custom columns

 

In both instances, when I point a gallery's Items to a Collection, the data loads quickly and the gallery scrolls smoothly. But when I point Items to the Dataverse Table, the gallery takes forever to load and scrolling through the gallery becomes nearly impossible. It might also be important to note that the Items point to a Dataverse Table filtered by a View. The slow loading behavior happens in Studio, Preview and when using the app normally.

 

I have "Explicit Column Selection" turned on in my app settings. 

 

While this isn't an issue today, I could see a delegation issue popping up in the future if I continue to use collections in these instances. Does anyone know what I can do to make the gallery loading experience better when pointing Items to a Dataverse Table?

 

Thank you.

Categories:
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @powerwood 

     

    Based on your scenario, Really you don't need a collection to display the data on the gallery. We can directly bind the data from Dataverse. As you said, we have more than 100k data which PowerApps works fine as long as it has a proper filter which the result should be less than the maximum limit (2000).

     

    Please share the table, filter condition, and fields type that you are trying to do filtering. We can help you to find the problem and guide you to the solution.


    Thanks,
    Stalin - Learn To Illuminate

  • rbergan Profile Picture
    199 on at

    @StalinPonnusamy , 

     

    Thank you for offering to help. The main issue occurs when I use the "Purchases" table. Here are some of the details.

     

    Items property in the gallery:

    Filter(colPurchasing,
     IsBlank('Vendor (crd93_Vendor)'),
     'PO No.' = cmbSearchPONoGalPurchasingNPS_2.Selected.Result || IsBlank(cmbSearchPONoGalPurchasingNPS_2.Selected.Result),
     'Job No' = cmbSearchJobNoGalPurchasingNPS_2.Selected.crd93_jobno || IsBlank(cmbSearchJobNoGalPurchasingNPS_2.Selected.crd93_jobno),
     Item = cmbSearchItemsGalPurchasingNPS_2.Selected.Result || IsBlank(cmbSearchItemsGalPurchasingNPS_2.Selected.Result),
     'Vendor (crd93_Vendor)'.Name = cmbSearchVendorGalPurchasingNPS_2.Selected.Name || IsBlank(cmbSearchVendorGalPurchasingNPS_2.Selected.Name),
     'Vendor (crd93_Vendor)'.Name = cmbVendorNPS_2.Selected.Name || IsBlank(cmbVendorNPS_2.Selected.Name)),
     Filter(colPurchasing,
     'PO No.' = cmbSearchPONoGalPurchasingNPS_2.Selected.Result || IsBlank(cmbSearchPONoGalPurchasingNPS_2.Selected.Result),
     'Job No' = cmbSearchJobNoGalPurchasingNPS_2.Selected.crd93_jobno || IsBlank(cmbSearchJobNoGalPurchasingNPS_2.Selected.crd93_jobno),
     Item = cmbSearchItemsGalPurchasingNPS_2.Selected.Result || IsBlank(cmbSearchItemsGalPurchasingNPS_2.Selected.Result),
     'Vendor (crd93_Vendor)'.Name = cmbSearchVendorGalPurchasingNPS_2.Selected.Name || IsBlank(cmbSearchVendorGalPurchasingNPS_2.Selected.Name),
     'Vendor (crd93_Vendor)'.Name = cmbVendorNPS_2.Selected.Name || IsBlank(cmbVendorNPS_2.Selected.Name)))

    colPurchasing is a collection that runs on the screen's OnVisible property:

    ClearCollect(colPurchasingexCanceled, Filter(Purchases,'Purchases (Views)'.'Purchasing Lookup View ex Canceled'))

     

    When I attempt to point Items directly to the Purchases table, it looks like this:

    Filter(Purchases,
     'Purchases (Views)'.'Purchasing Lookup View ex Canceled',
     'PO No.' = cmbSearchPONoGalPurchasingNPS_2.Selected.Result || IsBlank(cmbSearchPONoGalPurchasingNPS_2.Selected.Result),
     'Job No' = cmbSearchJobNoGalPurchasingNPS_2.Selected.crd93_jobno || IsBlank(cmbSearchJobNoGalPurchasingNPS_2.Selected.crd93_jobno),
     Item = cmbSearchItemsGalPurchasingNPS_2.Selected.Result || IsBlank(cmbSearchItemsGalPurchasingNPS_2.Selected.Result),
     'Vendor (crd93_Vendor)'.Name = cmbSearchVendorGalPurchasingNPS_2.Selected.Name || IsBlank(cmbSearchVendorGalPurchasingNPS_2.Selected.Name),
     'Vendor (crd93_Vendor)'.Name = cmbVendorNPS_2.Selected.Name || IsBlank(cmbVendorNPS_2.Selected.Name))

     

    As you can see, we are just replacing the collection with the filtered Purhases view that makes up the collection. When I do this now, the gallery is loading much faster than it did a couple of days ago. When I filter the gallery by one of the dropdowns (cmbSearchVendorGalPurchasingNPS_2.Selected.Name - which is a combobox that points to a separate Dataverse Table called Vendors), it takes longer for the gallery to filter the results when Items are pointed to Dataverse than to a Collection. 

     

    Are there any best practices that I am violating, or at least that I should be aware of here?

     

    Thank you so much for your help.

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @powerwood 

     

    I changed the Items' property. Please try this.

     

    Filter(Purchases,
     'Purchases (Views)'.'Purchasing Lookup View ex Canceled',
     IsBlank(cmbSearchPONoGalPurchasingNPS_2.Selected) || 'PO No.' = cmbSearchPONoGalPurchasingNPS_2.Selected.Result,
     IsBlank(cmbSearchJobNoGalPurchasingNPS_2.Selected) || 'Job No' = cmbSearchJobNoGalPurchasingNPS_2.Selected.crd93_jobno,
     IsBlank(cmbSearchItemsGalPurchasingNPS_2.Selected) || Item = cmbSearchItemsGalPurchasingNPS_2.Selected.Result,
     IsBlank(cmbSearchVendorGalPurchasingNPS_2.Selected) || 'Vendor (crd93_Vendor)'.Name = cmbSearchVendorGalPurchasingNPS_2.Selected.Name,
     IsBlank(cmbVendorNPS_2.Selected) || 'Vendor (crd93_Vendor)'.Name = cmbVendorNPS_2.Selected.Name
    )

     


    Thanks,
    Stalin - Learn To Illuminate

  • rbergan Profile Picture
    199 on at

    @StalinPonnusamy ,

     

    That works nicely. Thank you. It seems like a pretty simple solution, but so far so good. Thank you!

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard