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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Template size of a gal...
Power Apps
Answered

Template size of a gallery

(1) ShareShare
ReportReport
Posted on by 196
Hi all, 
 
Does anyone have any experience with dynamically sizing the template size of a gallery based on the number of rows in the gallery?
 
I'm trying to size the height of the template size based on the number of rows divided by the height of the actually gallery, can this be done?
Categories:
I have the same question (0)
  • Suggested answer
    CarlosFigueira Profile Picture
    on at
    You can set the TemplateSize property of the gallery to a formula like the one below to do that:
     
    Self.Height / Self.AllItemsCount
     
    This would make the gallery template resize depending on the number of rows:
     
     
    Hope this helps!
  • DerrickH Profile Picture
    196 on at
    Thanks!  though I'm getting an error on the TemplateSize property. 
     
    Formula:  Self.Height/Self.AllItemsCount
     
    Error:  "This rule creates a circular reference between properties, which is not allowed.  A property cannot reference itself or other properties affected by its value."
  • Verified answer
    CarlosFigueira Profile Picture
    on at
    What is the 'Items' property in your gallery? Does it reference one of the gallery's own properties?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard