web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove data from table...
Power Apps
Suggested Answer

Remove data from table based on selections from a gallery

(0) ShareShare
ReportReport
Posted on by 61
I have a table called table1 and it has the following data
EmployeeID Name
34 Bob
35 Mary
36 Jane
 
I have table two called table3 and it has the following data
TaskID Task EmployeeID
1 Pick it up 34
2 Put it down 34
3 Pick it up
35
4 Pick it up 36
5 Move it around 34
6 Spin around 35
 
I have a gallery that shows table1 and I have added a check box so that the user can select one or more EmployeeID.
They then press a button and I want to remove all records in table2 where the EmployeeIDs selected in the gallery are removed from table2.
 
So if the user was to select Bob and Jane then the tasks removed from table2 would be 1,2, 4 and 5 as these are the EmployeeIDs for Bob and Jane.
 
It sounds simple, and I am sure it is, but for some reason, I cannot get this to work. 
 
Thanks for any assistance. 
Categories:
I have the same question (0)
  • Suggested answer
    timl Profile Picture
    36,558 Super User 2025 Season 2 on at
    Hi y EricSara77
     
    Assuming your gallery is called Gallery1 and the checkbox in the gallery is Checkbox1, something like this should delete the selected rows from Table2.
     
    RemoveIf(
        Table2,
        EmployeeID in Filter(Gallery1.AllItems, Checkbox1.Value).EmployeeID
    )
     
  • Pacel1 Profile Picture
    79 on at
    In checkbox Onselect property You have to put something simmilar to this
    ClearCollect(
    SelectedEmployees,
    Filter(Gallery1.AllItems, Checkbox1.Value).EmployeeID
    )

    In button for user removal something similar to this:
     
    ForAll(
        SelectedEmployees,
        RemoveIf(
            table2,
            EmployeeID = ThisRecord.Value
        )
    )


     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 361

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard