cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Toby_GS
Level: Power Up

PowerApps write to multiple excel spreadsheets

Hi everyone,

 

This is my first time using PowerApps so very unfamiliar with it. I wanted to know if it was possible to write to multiple excel spreadsheets from a singular App. I know you can connect to different data sources, but can you re-write back to them?

 

So this is the flow that i would like to happen, when i select a name and add comments in the app, i want it to write back to the correspnding excel spread sheet.

 

Does this make sense?

 

Regards

Toby

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff LanceDelano
PowerApps Staff

Re: PowerApps write to multiple excel spreadsheets

So, in the place where you do an update of the data you can include more than one patch statement by separating them with semi-colons.   So,

 

Patch(...) ;  // here is the first patch statement to your first data source

Patch (...)  // here is the second patch statement to your second data source.

 

You can also wrap the statements to check that the first patch was successful before you allow the second patch statment to proceed by checking the return value.  This article may help with more details.

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-forms#browse-records

 

5 REPLIES 5
PowerApps Staff LanceDelano
PowerApps Staff

Re: PowerApps write to multiple excel spreadsheets

PowerApps can write to multiple data sources.  Just add the second data source and then connect up your controls to the data source, in particular, that you want to update.  

Toby_GS
Level: Power Up

Re: PowerApps write to multiple excel spreadsheets

is there a video tutorial that i can use to help me understand that better?

 

Thanks 

Toby

PowerApps Staff LanceDelano
PowerApps Staff

Re: PowerApps write to multiple excel spreadsheets

There are a several youtube videos out there on working with multiple data sources.  So, it depends on what you want to emphasize.  Use this search string "working with multiple datasources in powerapps".  Then, take a look for what might help you best.

Toby_GS
Level: Power Up

Re: PowerApps write to multiple excel spreadsheets

the videos i watched showed how to draw data from multiple lists and then push data back to a masta form, but i couldn't find a video or tutorial which would write back to individual data sources.

 

So the ideal flow i am trying to create is this situation:

- 1 powerapp

- multiple excel files each with different names

- In powerapps select name (these names are based on the individual excel files)

- write a comment and then powerapps writes it back to the invididual excel file based on my name selection.

 

So as an example, i have an excel file named 'Peter', In the PowerApps, i have a drop down named 'Peter' and when i write a comment and submit, it writes into the excel file named 'Peter'. I have another excel file named 'Julie' and in the same PowerApps, i have can now select 'Julie' add a comment and it writes back to the 'Julie' excel file.

 

Thanks for the help.

 

regards

Toby

PowerApps Staff LanceDelano
PowerApps Staff

Re: PowerApps write to multiple excel spreadsheets

So, in the place where you do an update of the data you can include more than one patch statement by separating them with semi-colons.   So,

 

Patch(...) ;  // here is the first patch statement to your first data source

Patch (...)  // here is the second patch statement to your second data source.

 

You can also wrap the statements to check that the first patch was successful before you allow the second patch statment to proceed by checking the return value.  This article may help with more details.

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-forms#browse-records

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

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

Top Kudoed Authors
Users Online
Currently online: 204 members 4,588 guests
Please welcome our newest community members: