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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (2,960)