cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mattthew
Advocate I
Advocate I

Remove Item from SharePoint List and Collection based on variable

How can I remove an item from a collection and corresponding sharepoint list.

 

I have a trash can that patches a variable 'Del' to true.  I would then like it not only to remove the item from the collection also the sharepoint list.

 

Click Trash Icon

Patch(projectcollection, ThisItem, {Del:true}) //works

Remove(projectcollection, ThisItem) //works

Remove('project list', ????) // confused at this part with the sharepoint list and referencing that item from the collection any help is appreciated!

 

 
1 ACCEPTED SOLUTION

Accepted Solutions

Thanks @Eelman  you put me on the right path.

 

Solution: Remove('Project List', LookUp('Project List', ThisItem.ID=ID));

View solution in original post

3 REPLIES 3
Eelman
Super User
Super User

@mattthew 

Try

Remove('project list', ID = ThisItem.ID) 

 

Thanks @Eelman  you put me on the right path.

 

Solution: Remove('Project List', LookUp('Project List', ThisItem.ID=ID));

View solution in original post

@mattthew 

Tick your response as the solution mate. This helps others looking for the same solution to find it more quickly 🙂 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,116)