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 highlight the s...
Power Apps
Unanswered

How to highlight the selection on gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have  a gallery and it is set to a collection Alerts. There  is a dropdown that has different sort option applied on the gallery.

I have selected sort option 1 and selected second item in the gallery that opens further details of the selected item.

Now I change the sort option 2 and obviously the gallery list order changes with this the second item which I selected in the gallery also changes and that renders the new positioned second item's details and not the prior user selected item.

 

Requirement :

Even when user selects multiple options in sort drop down and the collection items gets repositioned , it should not change the details of the original selected item. The left side gallery should scroll to the original selected item where ever its repositioned in the gallery.

 

Any idea how this can be done? Thanks in advance.

 

I could manage until the details view doesnt get chnaged with sort order but the gallery is not getting scrolled to the repositioned selected object id.

 

 

 

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @RoopaPendyala,

     

    Sorry but I cannot fully understand what you are trying to describe, would you please share some screenshots of your app? Also, please post the related formulas that you have used in the gallery.

     

    Regards,

    Mona

  • Mike8 Profile Picture
    1,330 on at

    Hello,

    Yes, Mona is right, it always helps if you have the related formula and some screenshoots. 🙂

    Nevertheless if I understood correctly, you can try this..
    You have a gallery that displays the items --> Gallery1
    Gallery1 has a source ---> Expression1
    You use a dropdown to sort the gallery --> Dropdown1

    Try to do the following and check if it is working.
    Dropdown1.OnChange = UpdateContext({vReset:true});UpdateContext({vReset:false})
    Gallery1.Items = If(!vReset,Expression1)


    In an example that I have created Expression1 = Switch(Dropdown1.Selected.Value,"1",Sort(A,ID),"2",Sort(A,text))
    So it needs to change to:
    Gallery1.Items = If(!vReset,Switch(Dropdown1.Selected.Value,"1",Sort(A,ID),"2",Sort(A,text)))

    Edit: I assume that you have set the Default value in the Gallery1.
    If not, please share the related expressions and we can find a way.

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
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard