cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vsslasd
Level 8

Re: Using the values returned by behaviour formulas (i.e. Patch)

Thank you, All. 

Also wish there was additional/better documentation on this. 

The UpdateContext isn't what I am looking for as much as updating the actual Collection itself. 

How is that done? I don't think it is automatic, is it, unless one does a forced refresh: Refresh(Collection, SQLTable) ?

vsslasd
Level 8

Re: Using the values returned by behaviour formulas (i.e. Patch)

Hello, @murali 

Can you please iterate how we would update the collection as you specified:
UpdateContext({Submitted: Patch(....)})

 

We need to retrieve the RowId Identity value from the newly inserted rows (there could be many in the one insert) in SQL Server and update the "RID" column in our collection, with that RowId value?

 

We are using the following command to insert rows into SQL Server:

 

If(Connection.Connected,
Collect('[dbo].[Recommendation_Improved]', DropColumns(Filter(Recommendation, ActiveStatus="N"),"RID","ActiveStatus")));

 

The table is: [dbo].[Recommendation_Improved] (Identity seeded is RowId)

The collection is: Recommendation (Column to be updated is: RID)

Thank you.

 

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
Users Online
Currently online: 213 members 6,304 guests
Please welcome our newest community members: