web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Changing Gallery Templ...
Power Apps
Answered

Changing Gallery Template Size Property based on label with autoheight

(0) ShareShare
ReportReport
Posted on by 52

Hi Everyone,

I have been working on a new app and I am using a gallery to display some data, within each gallery item I have one field that has some variably longer text in it, so I want to update the TemplateSize property based on the height of the field that contains the longer text, so that the text does not overrun the template into the next gallery item.

I have a label Title8_9 (yes badly named) which contains the long text and sits inside the gallery item template, this is set with autoheight ON.

I tried changing Template Size property to :

Title8_9.Height + 20 

This works but only AFTER an item is selected, otherwise it only reads the height as 20 (or whatever value I am adding to it) I did some investigation and it seems that the Title8_9.Height does not always carry a value:

Before clicking to select a gallery item:

 

There is no value for Title8_9.Height , so my templatesize is coming out as 20.

 

2020-03-02_16-30-05.png

 

After clicking a gallery item, Title8_9.Height now has a value of 81:

So now the total is 101 which is how I want it to work, but without first needing to select a gallery item.

2020-03-02_16-30-40.png

 

Am i missing something obvious here? Or is it just how PowerApps is processing height values when AutoHeight is being used?

 

Thanks for any help!

Categories:
  • Verified answer
    a-ovbord Profile Picture
    Microsoft Employee on at

    Hi @Ry2jericho,

     

    Did you try to accomplish this with flexible height gallery?

     

    Thank you,

    Ovidiu

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard