cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Hepworthnot
Level: Powered On

Gallery not showing all items

Hi,

 

I know this has been asked before but the thread https://powerusers.microsoft.com/t5/General-Discussion/URGENT-Gallery-not-showing-all-items/m-p/4162... didn't answer the question.

 

I have a gallery with a filter on it. The gallery is not showing all the records.

 

New records in particualr are not showing. I know the record is created as I have checked the source sharepoint list.

 

I have tried without the filter - that doesn't work.

 

Can you help please?

 

If the list has more than 500 records would that be a possible cause?

 

Thanks

Phil

2 ACCEPTED SOLUTIONS

Accepted Solutions
andrewichert
Level 8

Re: Gallery not showing all items

Hello @Hepworthnot,

 

your suggestion about the limit record seems to be right.

 

You can do two things to bypass this:

  1. You could just increase the number of the data row limit. Go to File/App settings/Experimental features - there you could set the number.
  2. More preferable: put your data as raw input into a collection and save this collection. After this you could easily access and for example filter your data.

Code example for collecting and saving:

If(
  Connection.Connected,
  ClearCollect(localData, 'YourDataSource'),
  SaveData(localData, "saveLocalData");
  LoadData(localData, "saveLocalData", true)
)

This code checks for a available connection and retrieves the data. If no data is available it will load the already saved data from your cache.

 

Note: in the web browser you will get an error message trying to save a collection. You could easily ignore this, as it will work properly on your device. For just creating the collection ignore the rest and just do the ClearCollect.

View solution in original post

Hepworthnot
Level: Powered On

Re: Gallery not showing all items

Hi @andrewichert,

 

thanks so much for your swift reply.

 

I have just used solution 1 and it worked perfectly.

 

Solution 2 looks more complicated but I see you say it is preferable. Why do you think it's a better solution? That may persuade me to do the extra work Smiley Happy

 

Cheers

Phil

View solution in original post

6 REPLIES 6
andrewichert
Level 8

Re: Gallery not showing all items

Hello @Hepworthnot,

 

your suggestion about the limit record seems to be right.

 

You can do two things to bypass this:

  1. You could just increase the number of the data row limit. Go to File/App settings/Experimental features - there you could set the number.
  2. More preferable: put your data as raw input into a collection and save this collection. After this you could easily access and for example filter your data.

Code example for collecting and saving:

If(
  Connection.Connected,
  ClearCollect(localData, 'YourDataSource'),
  SaveData(localData, "saveLocalData");
  LoadData(localData, "saveLocalData", true)
)

This code checks for a available connection and retrieves the data. If no data is available it will load the already saved data from your cache.

 

Note: in the web browser you will get an error message trying to save a collection. You could easily ignore this, as it will work properly on your device. For just creating the collection ignore the rest and just do the ClearCollect.

View solution in original post

Hepworthnot
Level: Powered On

Re: Gallery not showing all items

Hi @andrewichert,

 

thanks so much for your swift reply.

 

I have just used solution 1 and it worked perfectly.

 

Solution 2 looks more complicated but I see you say it is preferable. Why do you think it's a better solution? That may persuade me to do the extra work Smiley Happy

 

Cheers

Phil

View solution in original post

andrewichert
Level 8

Re: Gallery not showing all items

Hi @Hepworthnot,

 

the second solution is preferable because of the limitations of what is delegable in PowerApps (see https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview for reference).

 

I always try to collect my data in simple call without any filtering. Afterwards you could filter, sort etc on your collection and even save the result to a new collection as your device has already all the data it needs. You minimize the requests to the server and the result will be much faster as it depends on your device speed once the data is loaded.

 

As a benefit the above code saves the data to the local cache of your device. So you could enter all your data even if the internet connection isn't available.

Hepworthnot
Level: Powered On

Re: Gallery not showing all items

Excellent, thank you @andrewichert.

nirvana_moksh
Level: Powered On

Re: Gallery not showing all items

I know you said it is much preferable to collect the data and then do the filtering, but when does it become a disadvantage to increase the data row limit? Right now I increased it from 500 to 2000. Will this drastically reduce the App performance?

andrewichert
Level 8

Re: Gallery not showing all items

Hi @nirvana_moksh, it really depends on the size of your data.

 

For example a table with with 40 columns but only 500 entries probably have a much higher impact on your loading speed than a table with 3 columns and 1500 entries. 

 

However it is possible to check your loading time for example with the Chrome Dev tools.The screenshot comes right from Chrome and displays the size, loading speed etc for the first 500 items of a test list.

 

I would recommend a loading time from up to 2 seconds for a once in a while load. But if you're trying to load the data on a screen a user will often visit I would definitely recommend to store the data in the cache.

 

 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,061)