cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tkomar1
Frequent Visitor

Patch Collection to Dataverse: Error is: Invalid Argument Type (Table). Expecting a Record value instead.

I was watching & following along with Reza Dorrani's video on creating an editable table in Dataverse but can't seem to get the Patch function to work.

 

Table Name: 

tkomar1_2-1623720487678.png

 

Unique Identifier in the Table:

tkomar1_3-1623720548624.png

 

 

OnVisible of my screen:

tkomar1_0-1623720322890.png

OnChange within my gallery: 

tkomar1_1-1623720398831.png

 

All of that shows no errors and the collection populates as changes are made: 

tkomar1_4-1623720696007.png

 

But I get an error on the Patch function; OnSelect of a Button:

tkomar1_6-1623720841690.png

 

 

Any ideas?  Thanks in advance for your time.

 

 

 

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @tkomar1 ,

 

I can't reproduce your problem.

I suggest you use forall() function instead of Patch() function to add multiple records at once.

 

For example:

ForAll(your collection As A, Patch(your dataverse table,Defaults(your dataverse table),{Column1:A.Column1, Column2:A.Column2,...}))

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

Hi Wearsky,

Thanks for your response; I previously had it set up as a ForAll function straight from the gallery (no collection), but was noticing performance issues which is why I thought using a collection might be faster.  Do you mean Patching from the gallery or a ForAll function for the collection? I have tried this before and keep coming up with the same issues so am wondering what I'm doing wrong.  I may not be doing the ForAll properly; the collection column names are cre92_vacationhours and it's looking for just 'Vacation Hours'.  I tried renaming the columns previously but couldn't get that to work either.

tkomar1_0-1623765947905.png

Error Msg:

tkomar1_1-1623765997566.png

Terri

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,868)