cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arigl
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
Sienna
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

Sienna
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
v-monli-msft
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.

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

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
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?

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

Sienna
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

Yes sure..

 

Sienna
Memorable Member
Memorable Member

So first option or second option?

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 (1,167)