cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gtriche
Advocate II
Advocate II

Group By in a gallery not showing all results

I am creating an invetory viewing power app and the 1st browse screen on gallery that my user will encounter is selecting what type of inventory they want to look through. Whether its demo, stock, etc. I have a group by to show each of the stock types but when i look at the results I am missing the 4th type - OG Stock. All 3 other stock types show up except this one. I checked my data and OG Stock does shows up in my data so I am not sure why the gallery wont show my 4th stock type.

 

I have attached a picture of my power app screen and a snip of my data showing the OG Stock is a valid stock type

1 ACCEPTED SOLUTION

Accepted Solutions

@gtriche 

Ah ha...record limit issue.  

Take a look at your record limits in your advanced settings.  Probably set at 500.  You can bump that up to as high as 2000.  

If you expect your datasource will grow larger than 2000, then you need to look into ways to delegate your query.

But for now, that should resolve that issue with only 1300 records.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

12 REPLIES 12
RandyHayes
Super User
Super User

@gtriche 

That does seem odd..  

First, refresh your data source (make sure there is not a lapse in data).

Then, to test, change your Items property to Distinct('[dbo].[V_Inventory]', "Stock_x0020_Type") and adjust your label to be ThisItem.Result  and see if you get everything you expect.  This would just be a test to see if it is actually seeing them.

 

I hope this helps lead to a solution.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

Unfortunately that didnt work, its still showing the same results as before.

 

I removed the group and just called all results and OG Stock is showing up as a result when just looking at all data, but it is not showing as a stock type in the group...

@gtriche 

Usually the gallery is my "go to" place for visual results, but, let's try something else since your group of stock types is under 5...

Throw a test button on your screen somewhere and set the OnSelect formula to this:

ClearCollect(colStockType, 
        Distinct('[dbo].[V_Inventory]', "Stock_x0020_Type")
     )

Then take a look at the collection in the Collection viewer.  It SHOULD have all the distinct values that you are looking for.  

If the one you are missing is still not there, then there is something else going on from the data source...and we'll investigate further.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

I tried that and its only showing me the colum name in the results list. its not showing any of the stock types at all 😞

@gtriche 

You probably have delayed load enabled in your settings.  

Try turning that off or put a label on the screen with a text property of CountRows(colStockType) to kick it to load.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

its still only showing the column name and the label is returning a count of 1. Also turned off the delayed load and no change

@gtriche 

Did you exit out of the designer and then reload the app?  Some of those settings are not instant. 

Try to get that collection to load for a test...that should really show you exactly what is coming in and perhaps where the issue might be.

I've got to be away from the forum for a while, so I'll check back in on you in a couple hours to see how it is going.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@gtriche 

Any update?  Were you able to get anywhere with it?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes  I think I figured out the issue.

 

My view has 1300 records and I'm guessing power apps only loads in so many records at a time. The 1st insance of OG stock doesnt ocurr until the 500th record. I ended up adding a dummy OG stock record that would show up sooner within my view and OG stock showed up in my power apps list.

 

With that being said, would it be better for me to make a static list that could then filter my data? So that I dont have to have this dummy stock item in my data?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,596)