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

Patch Function Modify or create a set of records in a data source Example

Hi, I am looking for example where I can modify or create a set of records in a data source using Patch Function. (not using ForAll Function) like it is mentioned here - Patch function - Power Apps | Microsoft Docs

 

Thanks.

 
1 ACCEPTED SOLUTION

Accepted Solutions

@slalithp ,

No (you can Patch a single record), but you can use UpdateIf()

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User III
Super User III

@slalithp ,

Very broad question MS Document here - to create

Patch(
   ListName,
   Defaults(ListName)
   {
      Field1:Value1,
      Field2:Value2,
      ......
   }
)

If you are Patching a set of records - use ForAll() - collection example below

ForAll(
   CollectionName,
   Patch(
      ListName,
      {Identifier:CollectionIDValue},
      {Fields the same except referring to colleciton fields}
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Can I Patch a set of records without using forall function and with just the Patch function?

like it is mentioned here - Patch function - Power Apps | Microsoft Docs   

@slalithp ,

No (you can Patch a single record), but you can use UpdateIf()

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Okay, thank you @WarrenBelz  😀

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.

Top Solution Authors
Top Kudoed Authors
Users online (86,699)