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

Patch new record with entry in lookup column

I am struggling with how to patch a new row into a Dataverse for Teams table.

 

I have two tables in Dataverse for Teams, Accounts and Orders. The Orders table has a lookup column (custID) to an internal customer ID column within the Accounts table (CustomerID).

 

I am using Reza's guide and have created an editable gallery (Power Apps Editable Table using Gallery in Dataverse for Teams). In addition, on the screen I have a combobox to select the internal customer ID and display the standard information from the Accounts table in a Form Viewer (below these is the editable table gallery containing the orders from that internal customer ID).

 

I created a button to create a record in the Orders table with an OnSelect= Patch(Orders, Defaults(Orders), {custID:

 

And that is where I am stuck. No matter what I do, I cannot seem to create a new row in the editable table gallery where only the internal customer ID is entered and the user can input the rest. I thought I could get the customer id from the combobox, but I get an error. I thought I could get it from the Form Viewer, but I get another error.

 

Can someone help me out?

1 ACCEPTED SOLUTION

Accepted Solutions
dedrasher
Frequent Visitor

Someone with me recommended that I remove and reconnect my data sources. I doubted them, but did it anyway and the problem has been resolved.

View solution in original post

2 REPLIES 2
dedrasher
Frequent Visitor

Update: I can get the Patch function to work if I use a dropdown to select the internal customer ID with:

OnSelect=Patch(Orders, Defaults(Orders), {custID:DropDown1.Selected})

but not if I use a combobox. Is there a trick to using a combobox with Patch?

dedrasher
Frequent Visitor

Someone with me recommended that I remove and reconnect my data sources. I doubted them, but did it anyway and the problem has been resolved.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Users online (2,716)