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

Flexible Height Gallery (HELP)

Hi.  I'm having issues using a flexible height gallery.  I'm trying to use a textbox to filter a gallery and remove any gallery item that does not match.  Here is what I've done so far.  

 

1. Created a gallery.  The gallery's items property is a SQL datasource.

2. Created a textbox (txt)

3. For every label in my gallery, I grouped it and set the visible property to txt.Text in searchlb.Text

 

This works.  The flexible gallery auto-sizes everything and the blank items don't show up.  However, there are a lot of weird spaces in between which makes me think the full column isn't going to zero like it does in other examples.  

 

Sample.PNG

 

I have also tried to do this w/ the height setting it to 0 and 40.  It didn't work either.  What am I doing wrong?

6 REPLIES 6
Helper I
Helper I

Updated pictures to the main page.  Please delete.

Helper I
Helper I

BUMP - This is my last attempt to try to get feedback, I'm sorry for the spam.  I'm just really excited to get this resolved since this would be a huge help in a number of apps.

Helper II
Helper II

@dyee 
You should not be trying to simply "Hide" Gallery Rows. 

Please try a different approach, and considering Filtering the Datasource to gives you the results you wish to display. 

Example:

Filter(Datasource,DataSourceColumn, = "HOME DEPOT")


That will result in a Table being returned that only contains the items you want to display.

If This has guided you towards your answer, please mark as solution. 





The entire appeal of the flexible height gallery is to have search functionality without the delegation issue.  Here are a few reasons why it is a superior option (if it works).

 

  1. Search, unfortunately, has delegation issues
  2. Filter requires you to only use items in your database.  If I use a lookup, I can filter on it using search
  3. Multiple filters leads to very messy code.  I have 4 filters and I have to map out all the options which is increased by a factorial each time

@dyee Interesting, I have always tried to control the visible data by controlling it at the source. Almost like  RLS.
I have found the strong point in flexible height galleries to be more of an aesthetic, for applying a "see more" feature to applications. For example, my gallery (this is still under development) Has multiple items and you can see SOME details at a glance. But you may expand a particular item, revealing extra information (in my case ,an entire form) Without expanding every item in the gallery. 

KyleJ_0-1608249150031.png

Expanded gallery item:

KyleJ_1-1608249179659.png

 




This feature was achievable prior to flexible height galleries, however it was much more complicated to implement and buggy.

Additionally, I can still Search my gallery, and only show my searched results.

KyleJ_2-1608249328493.png

 


I would like to see a superUser/Employee comment regarding the officially correct way of going about this.  

Super User
Super User

Are you checking your gallery appearance in Studio mode or Play mode? Flexible Height Galleries often don't display correctly in Studio mode, so could be worth a test.

I would generally filter out the data I don't want visible rather than change the visibility. Make sure your datasource is delegable and set the DelayOutput property of your search text box to True (so you don't initiate a datacall on every keystroke on the text box, but rather wait until the user has not typed for half a second or so).

If you want to avoid the datacalls you could put the data in a collection and then base the item property of the gallery on a filter of the collection. For this you need to be certain that the amount of data you need to collect is less than your delegation limit and you will lose the performance feature of galleries with delegable data sources whereby they bring in data 100 rows at a time (only the first 100 matching rows populate until you scroll to the end of the gallery when it will fetch the following 100 and so on).

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (2,179)