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

Patch Error - Invalid Argument(Table) Expecting a record value instead

Hi everyone

 

I'm trying to create a repeating table style gallery in my PowerApps SharePoint form using Shane Young's video here.  I've got to the point about 18:26 into the video where I need to configre a save button to save a sub item and add a new row to the gallery.  The code I'm using for this is below:

 

Patch(SubItemCollection, ThisItem, {SubTitle: txtSubTitle.Text, SubPriority: choicePriority.Selected.Value, SubResp: ComboBox1.Selected.Claims, SubDate: dateSubDate.SelectedDate}; Collect(SubItemCollection, {SubTitle: "", SubResp: "", SubPriority: "", SubDate: ""})

 

However, I get an error on the Patch statement that says the following:

Patch Error - Invalid Argument(Table) Expecting a record value instead

 

I've tried searching for this error but nothing comes up and I can't work out why it's happening.  I'd be grateful if anyone who has come across this could let me know how I can resolve it?

 

Thanks in advance for your help.

1 ACCEPTED SOLUTION

Accepted Solutions

Yes I managed to get to the bottom of this. I'd missed out a closing bracket at the end of the formula so once this was added it worked with no issues. Not the first time this has happened and probably not the last 🙂 Thanks to everyone for their help.

View solution in original post

3 REPLIES 3
Drrickryp
Super User
Super User

Hi @gjayne84,

If you haven’t figured this out yet, I think the problem is with ThisItem. Try Lookup(SubItemCollection,ThisItem.ID=ID) instead of just ThisItem. If that doesn’t work try Lookup(SubItemCollection, Gallery1.Selected.ID=ID)

Anonymous
Not applicable

Thanks for your help with this @Drrickryp

 

@gjayne84 can you review the updated information and advise if it corrects your error?

 

@Anonymous

Yes I managed to get to the bottom of this. I'd missed out a closing bracket at the end of the formula so once this was added it worked with no issues. Not the first time this has happened and probably not the last 🙂 Thanks to everyone for their help.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,206)