cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sxkuan1
Frequent Visitor

Update all items that share a matching column value except for the latest item

Hello, I have a list of drug names and concentrations. When I add a new drug item, I want the drug's status column to become active and change the previous matching drug items to inactive. So far, I have get items with a Filter Query. It finds all the matching drugs, but it updates all items. I want it to only update all the older ones, not the latest one. Can someone help me solve this? If so, can I get a screenshot of an example? Thank you!

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Community Support
Community Support

Hi @sxkuan1 

 

Could you please tell me:

Do you want to change the new item status column to "active" and the old item status column to "inactive" when a new item is added in SharePoint? 

1. Data source (including A, B, C). 

vliweimsft_0-1664160275556.jpeg

 

2. FLOW.

vliweimsft_1-1664160289529.png

vliweimsft_2-1664160301030.png

vliweimsft_3-1664160313369.png

 

3.

vliweimsft_4-1664160327750.png

 

Best Regards,

Levi

 

View solution in original post

2 REPLIES 2
v-liwei-msft
Community Support
Community Support

Hi @sxkuan1 

 

Could you please tell me:

Do you want to change the new item status column to "active" and the old item status column to "inactive" when a new item is added in SharePoint? 

1. Data source (including A, B, C). 

vliweimsft_0-1664160275556.jpeg

 

2. FLOW.

vliweimsft_1-1664160289529.png

vliweimsft_2-1664160301030.png

vliweimsft_3-1664160313369.png

 

3.

vliweimsft_4-1664160327750.png

 

Best Regards,

Levi

 

Thank you for the suggestion! I was able to use your example for my flow.

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.

Users online (4,266)