cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LewisFoulger
Helper III
Helper III

Deleting a row in a collection where the Value of a column is equal to value in another collection.

Hello,

 

I am looking to delete the row from "colMerge" where the ProductID is the same in "colShoppingCart".

eg.

colShoppingCart, Title: Chocolate, ProductID: 1

colMerge, Title: Chocolate, ProductID: 1

 

At the moment when I use the trash button on my gallery it removes from colShoppingCart but not colMerge, on the button click I would like for the row to be removed from both?

 

LewisFoulger_0-1645441652692.png

I have tried and tried but to no avail, does anybody have an idea?

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Super User
Super User

@LewisFoulger 

Please try the following,

Remove(colMerge, LookUp(colMerge, ProductID=ThisItem.ProductID));
Remove(colShoppingCart, ThisItem)

 

Please remember to give a 👍 and accept my solution as it will help others in the future.

View solution in original post

4 REPLIES 4
CNT
Super User
Super User

@LewisFoulger 

Please try the following,

Remove(colMerge, LookUp(colMerge, ProductID=ThisItem.ProductID));
Remove(colShoppingCart, ThisItem)

 

Please remember to give a 👍 and accept my solution as it will help others in the future.

Thank you! I thought I was along the right lines, spot on there! Much appreciated!

 

 

@LewisFoulger Glad to help!

Duck123
Frequent Visitor

can this be used in office scripts?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,366)