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 III
Super User III

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

 

View solution in original post

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_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,214)