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

Collect response - get Id of created records

Hi,

I need to save collection to DataSource (SharePoint Online) and then get ID's of these records from SharePoint Online.

I have tried syntax like "Collect(CreatedTable, Collect(SharePointList, LocalTable))", but it collects all records to "CreatedTable" from SharePoint List. Is there anyway to achieve this? With single record, the case is simple - I use Set(Var, Patch(SharePoinntList, Record)) and I get all details about created record. But how to handle the whole collection?

1 REPLY 1
emh
Level 8

Re: Collect response - get Id of created records

Hello John,

If you are using Patch to update SharePoint then you only need to make a slight modification to your Patch command and place the results of your Patch into a new Collection. Then you may access this new Collection and extract the id.

ClearCollect(LastSharePointUpdates, Patch( your patch syntax)) );

Collection LastSharePointUpdates will have the data you seek.

Hope this helps.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 214 members 4,569 guests
Please welcome our newest community members: