Showing results for 
Search instead for 
Did you mean: 
Power Participant
Power Participant

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

How can we read/use the values returned by behaviour formulas such as Patch?


The reference article mentions this: "The return value of Patch is the record that you modified or created. If you created a record, the return value may include properties that the data source generated automatically."


I am not sure how to get the return value when associating a patch with an OnSelect of say a button.  This is useful to get the auto generated ID of a new item from a SharePoint list for example.


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) ?

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:


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

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 Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,716)