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"})));

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (11,359)