cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SunnyJess
Helper II
Helper II

Can I read data from one data source and post to another in excel

Powerapp Gurus,

 

Is it possible to select data from one or more excel tables and post it to another new excel table

 

ie

 

Table 1 data

Apples

Oranges

Mangos

 

Table 2 Data

Brisbane

Sydney

Melbourne

 

Table 3 Data

Farm Gate

Market

Store

 

Can I combine this data through a series of drop downs boxes and then have it submit to a new set of data.

 

Mangos   Sydney        Market

Mangos   Melbourne   Store

Apples     Brisbane      Farm Gate

Oranges  Sydney        Market

 

I hope this makes sense.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @SunnyJess

 

The third argument to the Patch function should include colon separated field/values.

 

Let's assume that your TestCrop table has three fields - Crop, City, Retailer

 

Also, let's assume that Table1, Table2, and Table3 include a single field - Description.

 

In this scenario, the call to Patch would look like this:

 

Patch(TestCrop,
      Defaults(TestCrop),
      {Crop:Dropdown1.Selected.Description,    
       City:Dropdown2.Selected.Description, 
       Retailer:Dropdown3.Selected.Description}
)

 

View solution in original post

6 REPLIES 6
timl
Super User
Super User

Yes, it's possible to do that. Broadly speaking, the first step is to add the 4 tables to your app via the view > data sources menu.

Next, you can add a screen and insert 3 drop down controls. Set the Items property of your drop down controls to Table1, Table2, and Table3.

You can then add a button and add formula to the OnSelect property to call the Patch function. Here's a link on how to use this function.


https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

I have followed the patch function instructions and it isn't working.

 

see attached screenshot

 

I connected the data source, inserted a form, added the drop down, selected the data for the drop down, inserted a button, used the patch data and i get the error "Patch has invalid arguements"

 

What am i doing wrong please?

 

 

Hi @SunnyJess

 

The third argument to the Patch function should include colon separated field/values.

 

Let's assume that your TestCrop table has three fields - Crop, City, Retailer

 

Also, let's assume that Table1, Table2, and Table3 include a single field - Description.

 

In this scenario, the call to Patch would look like this:

 

Patch(TestCrop,
      Defaults(TestCrop),
      {Crop:Dropdown1.Selected.Description,    
       City:Dropdown2.Selected.Description, 
       Retailer:Dropdown3.Selected.Description}
)

 

Hi @timl,

 

That has worked perfectly, thank you so much for your assistance.  Smiley Happy

@SunnyJess I did the same thing slightly differently in this video. PowerApps multiple Data sources

 

Basically, I created my form using the data source I wanted to update and then I changed the cards and their update properties. Same end result, just a different way to go about it if you are interested. 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Hi @Shanescows,

 

I must have watched all of your videos except that one when looking for a solution.  This was the original method I tried, but couldn't get it to work with the template I had.  Now I've seen it, I know what I am looking for.

 

Thanks for the videos Dude.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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