cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Memorable Member
Memorable Member

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

Highlighted
Memorable Member
Memorable Member

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
Highlighted
Community Support
Community Support

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

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

 

 

 

Highlighted
Memorable Member
Memorable Member

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 

Highlighted

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?

Highlighted
Memorable Member
Memorable Member

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?

Highlighted

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

Highlighted
Memorable Member
Memorable Member

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

Highlighted

Yes sure..

 

Highlighted
Memorable Member
Memorable Member

So first option or second option?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,544)