I've created a gallery inside a canvas element. Each gallery element contains several elements to display. I want to calculate the sum of the height of all gallery items to set the number for the Height-Attribute of the gallery.
The gallery should be shown with full height and I want to use this inside a gallery element to add other items below the gallery.
Solved! Go to Solution.
You can add a label in your MyGallery. Let's name it LabelRecordSum.
This label will show the sum of the labels' heights
Now outside of your gallery create a label ---> LabelSum
Now you can set:
LabelRecordSum.Visible=false and it's hidden from the user but still does what you need.
I hope it's good enough for you.
thank you very much. This mostly achives my goals. Have to round up a little bit and add some more values. But your solution is what was needed.
Hey @Anonymous glad you got it working. Just out of curiosity did you try the flexible height gallery control? I didn't know about it until recently but I wonder if it does what you want on its own?
Hi @Shanescows, you mean "Blank flexible height"? Yes I'm aware of this and always using this, as it gives me the most control about my galleries. But it doesn't work as expected. Sometimes everything is fine but in most cases I've been using a nested gallery or every element has an autoheight attribute turned on (like labels) and this will broke most of the galleries.
I don't want to rely on this feature and use my own calculations to show the galleries properly.
Thank you so much for this solution. I have been working my butt on getting the galleries to not scroll within a scrolling canvas... saves my day!
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.
The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.
We are excited to announce a new way to share your ideas for Power Apps!