cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mkhan73
Helper I
Helper I

Filtering Gallery based on current user by grouping them and using Flexible Height Gallery

Anyone here worked with the "Flexible Height Gallery?" I am trying to filtering out the SharePoint list based on the current user and only show data to the specific user in the gallery. However, because there are many items in my SharePoint list, grouping the data and making them visible based on current user is the only feasible way to filter out the gallery. But, because there are more items, the current user data is somewhere between within the gallery and I don't want user to scroll the gallery to look for their item? Is there any way to only show the data to the current user without empty space? I referenced this video https://www.youtube.com/watch?v=tPxE_-DcWkg and thought flexible gallery will resolve my issue but is there a way to only show data for the current user in the gallery without scrolling to find their item? 

19 REPLIES 19

Yes, exactly what my problem is that the user must scroll through a long list of "empty" to get to that line that is showing their data. Is there a way to show this data on top of the gallery instead of scrolling through the list.

RandyHayes
Super User III
Super User III

@mkhan73 

Good, that is what I had assumed.  

So, in a FlexHeight if a row has no visible controls in it then it will size to zero.  If the template height remains the same, then either you're not using a Flexible Height gallery or you have a control in the template that is still visible (perhaps with nothing to display, but still visible).

Can you verify these things?

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

so these are my settings for my gallery:

 

mkhan73_0-1610049581881.png

 

RandyHayes
Super User III
Super User III

@mkhan73 

That looks fine (BTW I was looking for the WrapCount property, if you had one, it was not a flexheight gallery...you don't have one so it is)

 

Now the bigger question is, are ALL of the controls in the template that should not be shown set to not Visible?

If you have even one visible control in the template, it will only resize itself to the bottom of that visible control.

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

@RandyHayes so I group all my labels within the Gallery and I set them visible to varUser.Mail in ThisItem.Owners.Email

RandyHayes
Super User III
Super User III

@mkhan73 

That should all be fine.  But do check all of them to make sure the Visible property is correct and that none of them are still visible (when they shouldn't be)

Technically, for a flexheight, only a control that is still visible would keep it from collapsing. 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

All of them have the same visible property (varUser.Mail in This.Owners.Email). I am not sure what else I am missing from the flex height gallery. 

RandyHayes
Super User III
Super User III

@mkhan73 

I'm not sure either.  I just made sure that what I am saying is working (only because remember that padding question? I went on an on with a thread a long while ago with flexheight's and only found the bug that I mentioned by vetting it myself in a sample app.)

 

Here is what my sample looked like:

RandyHayes_0-1610052407201.png

On the left is a normal Gallery with all items in it...pretty much what I expcted.

On the right is a FlexHeight Gallery.  The Items property is just a sorted list of some junk list data.

That junk list has a multi-person column.  (the emails are displayed in both galleries)

On the right gallery, there are three labels and a rectangle.  The Visible property of all of those controls is glbUser.Email in ThisItem.MultiPerson.Email

RandyHayes_1-1610052677784.png

RandyHayes_2-1610052716092.png

 

See if you see any irregularities from what I show and what you have.

 

As you can see, this does successfully filter the information as needed.

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Thanks for your help. I double checked my properties and everything looks the exact same as yours. I have opened the ticket with Microsoft to see if they can provide any help. 

RandyHayes
Super User III
Super User III

@mkhan73 

That sounds good.

The only last thing I would try is to put a fresh flexheight on the screen and set the Items property like the other.  Then add at least only one label and set the Visible property as you have and see if the problem exists in the new one.  If not, then build up from there.

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (14,524)