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 / TemplateSize of the Ga...
Power Apps
Answered

TemplateSize of the Gallery

(0) ShareShare
ReportReport
Posted on by 43

Hello everyone, I am addressing an issue with the TemplateSize of the Gallery in Power Apps.


The application operates such that when selecting a company first-aid kit from the main page to perform a check-up. Upon navigating to the new page, a next gallery displays the contents of the first-aid kit.

However, the problem arises not when selecting the first Aid kit, but during the selecting of second or third the Aid kit —> the entire gallery seems to collapse into a cluster, as illustrated in the attached image. The gallery then corrects itself when I click on this cluster.


I suspect the issue is caused by the automatic resizing of the TemplateSize, which you can find detailed below.

But the strange thing is that this cluster is forming randomly, and I can't figure out why..

Can anyone advise how to solve this problem?

 

TamplateSize of Gallery:

If(
TextPopup,
Title1 .Height + TextInput1_1.Height,
Title1 .Height
)

 

OnVisible of Screen: Set(TextPopup, false)

 

image.png

 

Categories:
I have the same question (0)
  • Verified answer
    Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @Zizlik ,

    Are you using a regular gallery (not a flexible height gallery?), if so, unfotunately I have also experienced that issue three years ago, apparently, they still did not fix the issue.

    But what worked for me is using the Flexible Height gallery. You don't even have to have a formula for the TemplateSize because it adjusts automatically.

     

    What I suggest is replacing your existing gallery with a flexible height gallery. Copy the existing contents and paste it in the new flexible gallery. Rename the new gallery into the old gallery name after you have deleted it (so you don't have the redo all the formulas that depend on it). The trick here is setting the TemplateSize into 0 after you put all the contents in. If you do not want to show some items in the gallery, you make it invisible and the gallery will adjust for you.

     

    You can try to reproduce a flexible gallery using the steps in the link below:
    Power Apps - How to make an accordion or expandable gallery 

     

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard