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 / Set Y position of a co...
Power Apps
Suggested Answer

Set Y position of a container to the Y position of Item in a Gallery

(1) ShareShare
ReportReport
Posted on by 12
I am trying to set the Y position of a container to the Y position of an icon within an gallery. The issue is, is that the container needs to change Y position based on the row where the icon is being selected. For example, if there are 5 rows of data and I select the icon for the 3rd row the container would align its Y position to the Y position of that icon. I've tried various methods but this needs to be dynamic as I have sort capabilities on the each column in the gallery.
 
Thank you
Categories:
I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    I have tried to recreate this with a button but should work with Container too. I have used the ID column for this. 
    If I select 1 from the gallery, the Button stays in front of 1:
    If I select 3, it goes in front for 3:
     
    Here's the Y value of the Button:
    Gallery.Y + Gallery.Selected.Title.Y + If(
        Gallery.Selected.ID = 1,
        0,
        (Gallery.Selected.ID - 1) * Gallery.TemplateHeight
    )
     
    Hope this helps you solve your problem. 
     
    Kind regards,
    Nandit
     
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
     
     
  • CU06090422-0 Profile Picture
    12 on at
    That did not work sorry. I may not have explained what I'm doing properly. I have a Horizontal Gallery, withing that gallery, I have a nested vertical gallery. For each item in that gallery is an icon. When I select that Icon, I have a container (that has a couple of galleries contained within), that I want to be visible and show next to the Icon selected. Now the Y may changed depending on which item is selected and I may want it to be slightly different based on the location of the icon to the bottom or side edge of the screen. I've attached an image of my layout with the container visible. 
    For example, If I select the icon for the first item I want the container Y property to be closer to the icon's Y property and if I select the 2nd item then the Y property is almost where it's currently sitting.

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
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard