cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anabananei
Level: Powered On

Patch Collection data as a single Item

Hello,

 

I've been following Shane Young's videos for a while now. I've been interested in the repeating tables which can be watched here: https://www.youtube.com/watch?v=xgznk4XlPCo

 

Now, I stumbled on a problem in which I want to patch the collection data as a single item. Is this possible?

 

Thanks in advane!


Regards,

Ana

4 REPLIES 4
Super User
Super User

Re: Patch Collection data as a single Item

Patch is used to add (or Update) a single record.

 

Collect can be used to add multiple records. If Collect-ing from a local collection into a datatable you need to ensure that all the names and types of the fields you are collecting are an exact match.

anabananei
Level: Powered On

Re: Patch Collection data as a single Item

Hello @PaulD1 ,

 

Thank you for your response. 

 

I've tried patching my collection to SP list. However, it creates new item for every row from my collection. What I wanted to achieve is to combine all data from the collection and insert it as a single entry in Sharepoint.

 

I have a button that functions OnSelect: ForAll(RemedialCollection,Patch(CAF,Defaults(CAF),{Title:title_datavalue.Text, RemedialAction:RemedialAct,RemedialActionDetails:RemDetails}))

 

However, this function creates new item per row. For example in my collections I have 3 entries, when I patch it, I will have 3 new entries in SP. Is it possible to combine those 3 entries into 1 entry?

 

Thank you!

Super User
Super User

Re: Patch Collection data as a single Item

Hi @anabananei 

 

Sorry, I'm not sure how you want the three records to look when combine them into a single record. Can you post an example of the desired result please? 

anabananei
Level: Powered On

Re: Patch Collection data as a single Item

Hi @PaulD1 ,


Thank you for your response. To further explain my problem, I have a gallery in my app that works as repeating table.  

CAF_1.jpg

The data from the gallery is stored in a collection.

CAF_2.jpg

Using the formula for my button: ForAll(RemedialCollection,Patch(CAF,Defaults(CAF),{Title:title_datavalue.Text, RemedialAction:RemedialAct,RemedialActionDetails:RemDetails}))

 

It patches the data into SharePoint into separate items.


CAF_3.jpg

 

I wanted for the record to be combined and be posted as a single item such as:

RemedialAction: Action 1, Action 2

RemedialActionDetails: Details 1,Details 2

 

Many thanks!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,800)