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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (41,164)