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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (3,758)