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 / How to add gallery ite...
Power Apps
Unanswered

How to add gallery items at run time

(0) ShareShare
ReportReport
Posted on by 59

I have a vertical gallery_1 with 20 items , and those items will come when checkbox is checked in gallery_2 .I need them to automatically adjust, means when checked ,I need the  items keep shifting left , so that no gaps between the items.

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @Radhika123 ,

     

    I'd say to:

    1. collect the item in the OnCheck property of the checkbox.

    2. The resulting collection can then be used as the Items property of Gallery_2.

    3. To remove the items from Gallery_1, a filter need to be added to the Items property to filter out those items that are in the collection.

  • Radhika123 Profile Picture
    59 on at
    Spoiler (Highlight to read)
    Thanks @BCBuizer for your reply.
    But the items in gallery_2 are column names.
    Thanks  for your reply.But the items in gallery_2 are column names.
  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    HI @Radhika123 ,

     

    So you want to show certain controls in Gallery_1, based on the selected columns in Gallery_2? And the issue is that the controls are showing up, but not moving to the left in case a previous column is not selected?

     

    For that you'll have to play with the X property values of the controls in Gallery_1. Lowering that value will move the control to the left. 

  • Radhika123 Profile Picture
    59 on at

    Hi @BCBuizer 

    What is the meaning of lowering the value.shall I have to create a variable for that ?

    Sorry I'm new to this power apps.

    Thanks.

  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @Radhika123 ,

     

    The X property has a numerical value which corresponds with the position of the top left of the control on the X-axis of it's context.

     

    For instance, if you have a label in a screen with its' X property set to 0, this will make the lable show up all the way on the left. When raising the value to, let's say 200, it will move 200px to the right.ű

     

    If you enter a formula for the X property, you can make this dynamic. Let's say you have 3 labels (LeftLabel, MiddleLabel and RightLabel) next to each other and you the visible labels to line up to the left when any of them is made invisible:

    1. set the X property of MiddleLabel to: 

     

    LeftLabel.X + If(LeftLabel.Visible,LeftLabel.Width,0)

     

     2. set the X property of RightLabel to:

     

    MiddleLabel.X + If(MiddleLabel.Visible,MiddleLabel.Width,0)

     

    Of course you can play around with this a bit more to include more controls or the add padding between the controls.

     

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard