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

Patching problem

Hi all,

I'm new to powerapps and I have a problem which looks simple:

H9 is a 4 column table located in my onedrive (Excel),  I'm trying to write records to, ussing the function:

 

                                 Patch(H9, Defaults(H9) ,  {Date="1-Jan-2018", Name:"Ariel", Ar:"1", Dep:"1"})

 

The error: powerapps does not recognizes H9 as source and sometimes 'invalid arguments' is announced.

Please advice.

Thanks,

Ari

2 ACCEPTED SOLUTIONS

Accepted Solutions
Sienna
Level 10

Re: Patching problem

From your second picture it looks like your database is really wierd and long name. you have to rename your table in the excel. I don't how how did you renamed your table. I guess you just renamed the file name and not table. See image how to do it in excelexcel.png

View solution in original post

Sienna
Level 10

Re: Patching problem

I forgot to mentioned... Then delete your current datasource and replace it with new one exactly the way you were doing it last time

View solution in original post

24 REPLIES 24
Community Support Team
Community Support Team

Re: Patching problem

Hi @arigl,

 

Please have a look at below thread as reference:

https://community.powerapps.com/t5/General-Discussion/How-do-you-modify-a-set-of-records/td-p/64312

 

Try to first collect the items to a collection and then Patch the collection instead.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
arigl
Level: Powered On

Re: Patching problem

InThank you Mona. I've tried this:

 

collect(NewRec, {Date:DatePicker2.SelectedDate,Name:TextInput1.Text, Ar:"1",Dep:"1"});
Patch(H9,Defaults(H9),NewRec)

 

However, it doesn't work for the patch function because again H9 is not recognized (Invalid argument expacting table instead)

 

Kind Regards

Ari

 

 

 

Sienna
Level 10

Re: Patching problem

Sorry to mess in your conversation.. You better use ClearCollect instead Collect so everytime you use NewRec table and patch to H9 automatically clear it from NewRec. And change  Patch(H9,Defaults(H9),NewRec) to Patch(H9,Defaults(H9),First(NewRec))  to tell which line you want to patch into the H9. You can't patch whole table.. you can patch only line 

arigl
Level: Powered On

Re: Patching problem

Hi Sienna,

Thanks for your answer. The error is on the Patch function not recognizing the table which is located in my OneDrive as an excel file maybe it is a scurity issue. Does anybody knows if there are any security issues here?

Sienna
Level 10

Re: Patching problem

I don't think there are any security issues. It works well with my excel table. Can you tell us how did you connect the excel table into the PA? Did you use connections or did you just add it to datasource?

arigl
Level: Powered On

Re: Patching problem

I've made a table then connected it to PA then selected the columns to show as it shown in many demo apps.

Sienna
Level 10

Re: Patching problem

Yes but how did you connect it to siena?

Did you go throu

File -> Connections..

then from your web borwser

Create a connection -> Chose OneDrive (or OneDrive for busineses) -> Log in

...and so on

 

Or did you just go to

View -> Datasources -> Add datasource

arigl
Level: Powered On

Re: Patching problem

Yes sure..

 

Sienna
Level 10

Re: Patching problem

So first option or second option?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 162 members 6,285 guests
Please welcome our newest community members: