cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

ForAll with Patch not updating records

I found the following item in a post about bulk updating records - I am trying to update the status field in my database table from a list of ids in a collection.

 

To update the Status of CheckedItems to “Done”, when the source and destination table column names are the same, here is the formula

ForAll(CheckedItems,Patch(ChecklistItemsSource,LookUp(ChecklistItemsSource, Id = CheckedItems[@Id]),{Status:"Done"}))

 

My actual code is

 

ForAll(MaintUpdateList,

     Patch('[dbo].[PYR_MAINTREVIEW]',

             LookUp('[dbo].[PYR_MAINTREVIEW]', MNT_ID= MaintUpdateList[@MNT_ID]),{Status:"Done"}))

 

My MaintUpdate List collection holds the primary key of the records I need to Update in the PYR_MAINTREVIEW table but this code does nothing.  

 

I am getting a delegation warning but this only updates a hand-full or records max so I wouldn't think that would be a problem would it?  

 

Any help would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

I got this to work by using the following code instead:

ForAll(MaintUpdateList,Patch('[dbo].[PYR_MAINTREVIEW]',{MNT_ID: MNT_ID},{STAT:"REVIEWED"})));

View solution in original post

1 REPLY 1
Anonymous
Not applicable

I got this to work by using the following code instead:

ForAll(MaintUpdateList,Patch('[dbo].[PYR_MAINTREVIEW]',{MNT_ID: MNT_ID},{STAT:"REVIEWED"})));

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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