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 / Entire gallery highlig...
Power Apps
Unanswered

Entire gallery highlighting once the multiselected rows are accepted and Datasource refreshes.

(0) ShareShare
ReportReport
Posted on by 102

Hi,

 

Please help me around this. I have a gallery with highlighting multiselected items by If (Checkbox.Value=true, blue, white).

Multi selection was made possible by creating collection as selected items and used in On Check and On Uncheck property of checkbox. When I accept multiple items by accept button, once accepted the DataSource refreshes but also all the rows were highlighting. This is happening when I select first row and other rows, unlike if I select the other rows except first row and accept it is working properly.

 

Thankyou,

Sai

Categories:
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @Sai47

     

    Add a new Boolean column to your SharePoint list called "Selected" to store the selection status of each item.

    In the OnCheck property of the checkbox, update the "Selected" column of the corresponding item in the SharePoint list to true.

     

    Patch(
    'SPList',
    LookUp('SPList', ID = ThisItem.ID),
    {Selected: true}
    );

     

    In the OnUncheck property of the checkbox, update the "Selected" column of the corresponding item in the SharePoint list to false.

     

    Patch(
    'SPList',
    LookUp('SPList', ID = ThisItem.ID),
    {Selected: false}
    );

    In the Items property of the gallery, filter the data source based on the "Selected" column.

     

    Filter('SPList', Selected = true)

     

    In the Accept button's OnSelect property, update the "Selected" column of the selected items in the SharePoint list to false.

     

    ForAll(
    Filter('SPList', Selected = true),
    Patch(
    'SPList',
    LookUp('SPList', ID = ID),
    {Selected: false}
    )
    )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

     

  • Sai47 Profile Picture
    102 on at

    Apologies, as I tried with above but its not working in my case with selected column, as collection exists in ItemsGallery and Onselect Accept button is working okay , Is there any option for Template fill to change please let me know.

     

    Is the problem with this If(Checkbox.Value=true, blue, white) in Templatefill Gallery or is it with collect(selectedItems,ThisItem) in Oncheck property of Checkbox.

     

    Thanks,
    Sai

     

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard