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.
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?
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.
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.
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).
@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.
Expanded gallery item:
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.
I would like to see a superUser/Employee comment regarding the officially correct way of going about this.
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).
Check out our new profile badges recognizing authored solutions!
We are excited to announce the Power Apps Super Users!
Did you miss the call? Check out the Power Apps Community Call here.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!