cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
whatupe
Level: Powered On

Patching a Lookup column in the CDS from PowerApps

I've read through several posts that mention that a lookup column is a record, and so when you go to Patch, you need to provide a full record.  I have a form that saves successfully to my primary table, then I have a gallery that I'm saving onSuccess on the form being submitted.  The code for this is:

 

ForAll(RoomsCollection, If(!IsBlank(LineItemDate),Patch('Meeting Guest Room Dates', Defaults('Meeting Guest Room Dates'), {cr623_primaryname:Text(LineItemDate), cr623_date:LineItemDate, cr623_singles:SingleRooms, cr623_MeetingServicesSiteResearch:Form2.LastSubmit})))

 

RoomsCollection is a collection that is initialized coming into the screen, and my 'Meeting Guest Room Dates' is the table I'm trying to save to that has the following fields: 

 

meeting guest room dates.PNG

The error I get is: 

meeting guest room dates2.PNG

As I understand it, LastSubmit is a record, and therefore setting cr623_MeetingServicesSiteResearch to this record should work.  

1 ACCEPTED SOLUTION

Accepted Solutions
TopShelf-MSFT
Level 10

Re: Patching a Lookup column in the CDS from PowerApps

1 REPLY 1
TopShelf-MSFT
Level 10

Re: Patching a Lookup column in the CDS from PowerApps

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,966)