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

Help : update in bulk

Hello, 

I am trying to bulk update records in SQL table "dbo.Test" from Gallary "Gallery1"

I have a collection which is made from Gallery1

approve.JPG

 

here is the onSelect when they click Approve

ForAll(Collection1,Patch(
'dbo.Test',
First(
Filter(
''dbo.Test',
ID = Gallery1.ID
)
),
{
Status:"Approved"
}
))

 

is it correct?

3 REPLIES 3
Highlighted
Super User II
Super User II

Try this: 

ForAll(Collection1,Patch(
'dbo.Test',
First(
Filter(
''dbo.Test',
ID = Collection1[@ID]
)
),
{
Status:"Approved"
}
))

 

Let me know if this works. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Highlighted
Super User III
Super User III

Try:

ForAll(Collection1,Patch(
'dbo.Test',
First(Filter('dbo.Test',ID = Gallery1.ID)),
{Status:"Approved"}))

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Community Support
Community Support

Hi @Mona1 ,

If you only want to update "Approved" to Status field, please try with UpdateIf function, which could be more efficient.

UpdateIf('dbo.Test', ID in Collection1.ID, {Status:"Approved"})

Hope this helps,

Sik

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,488)