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

Patching Updated Data to Excel Multiple Times

Hello!

 

It's been awhile since I've touched PowerApps (not my main job at my profession, so project was put on hold). Currently I'm in a bind.

 

I'm utilizing an Excel Connection on a cloud platform to log some information that happens on a specific day. When the user hit's Submit, it should write a new line on the spreadsheet for that day, however, I would like the user to be able to "Submit" the form multiple times a day, only adding the new information to the matching/existing "Date" item. As I understand it, using UpdateContext is for collections and I have no experience currently using collections - I am trying to keep all this info on the excel spreadsheet.

 

Thanks!

2 REPLIES 2
Super User
Super User

Re: Patching Updated Data to Excel Multiple Times

The UpdateContext() creates or updates a context variable. If you want to create or update an item in a collection or a data source then you will want to look at the Patch(). The parameters for the Patch() are a little different depending on if you are adding a new item or updating an existing item. The link below explains how the Patch() works.

 

Patch function in PowerApps



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.
Mitchgramazio
Level: Powered On

Re: Patching Updated Data to Excel Multiple Times

Is this easy to implement if I am utilizing the SubmitForm() function? Ideally, I just hit the "submit" button once and it either Creates or Updates the record, depending on if there is already a value for the specified date or not.