cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
echodapogi
Resolver I
Resolver I

Help on ForAll Patch with Filter

Hello Guys,

 

I need help on using ForAll Patch with filter. My scenario is I have a dropdown box (drpBatchText) and i have a sharepoint list named (xlsPullbackTablePlanningList). I have a field name of "Status" in my Sharepoint list. What i want to do is a button that will update all my  Status data to "Complete" based on drpBatchText value. 

 

Lets say drpBatchText value is: Batch 1. I need to update all the Status of that Batch 1 to "Complete".

 

Here is my code:  but i cannot make it work. 

ForAll(xlsPullbackTablePlanningList, Patch(xlsPullbackTablePlanningList, LookUp(xlsPullbackTablePlanningList, BatchName= drpBatchtoSend.SelectedText.Value), {Status: "Complete"}))

 

Thanks in advance. 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

I don't think you need Patch() in this case. Have you tried UpdateIf()?

It would look something like this:

UpdateIf( xlsPullbackTablePlanningList, BatchName= drpBatchtoSend.SelectedText.Value, {Status: "Complete"})

 

*Assuming Status is a text column



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Jeff_Thorpe
Super User
Super User

I don't think you need Patch() in this case. Have you tried UpdateIf()?

It would look something like this:

UpdateIf( xlsPullbackTablePlanningList, BatchName= drpBatchtoSend.SelectedText.Value, {Status: "Complete"})

 

*Assuming Status is a text column



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

echodapogi
Resolver I
Resolver I

Thanks Jeff. UpdateIf worked. 😀

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (38,063)