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 / Make dynamic size of g...
Power Apps
Answered

Make dynamic size of gallery

(0) ShareShare
ReportReport
Posted on by

Hi, hope you are doing great!

I am working on a PowerApps. I am using a ‘Gallery’ to capture information filled by user.

+ Button at right top, makes gallery visible and can further add more rows by clicking on + button.

 
 
 

Dynamic gallery 1.png

 

Formula on 'On Select' property of + button -

Collect( 
NewCollection, 
   { 
      CItemSerialNumber: Text(Last(NewCollection).CItemSerialNumber + 1),
      drpActionItem: "", 
      txtOtherActionItem: "", 
      txtDescription: "", 
      drpStatus: "",
      txtNotesActionTaken:"",
      txtClosureOwnerName: "",
      dteClosureDate: "" 
   } 
)

 

Requirement : Gallery size is static. After clicking on + button, gallery is visible at bottom. If, user has to add more rows that gallery looks crowded with lot of info.

Need to make gallery size dynamic. So, once user clicks than gallery should appear on top of main screen.

 

Dynamic gallery 2.png

 

Appreciate your help to achieve dynamic gallery size.

@WarrenBelz @RandyHayes @AJ_Z 

 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @AJ_vizMan ,

     

    You can use context variables to change the Gallery position. So:

    1. OnSelect of the add button:

    UpdateContext({GalleryY: A Y axis value for the Gallery you want to put, GalleryH: A height value for the high Gallery})

     

    2. OnSelect of the Cancel and Save button, add the following formula after your original formula:

    UpdateContext({GalleryY: The Y axis value of the Gallery's current position, GalleryH: The height value of the short Gallery})

     

    3. Set Y axis of the Gallery to GalleryY

     

    4. Set Height of the Gallery to GalleryH

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • AJ_vizMan Profile Picture
    on at

    This is easy and simple solution. Thank you @v-jefferni for help.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard