web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching a Lookup colu...
Power Apps
Answered

Patching a Lookup column in the CDS from PowerApps

(0) ShareShare
ReportReport
Posted on by 21

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.  

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This user has a suggested solution in a different thread which I will link to here:

     

    https://powerusers.microsoft.com/t5/General-Discussion/Patch-a-CDS-Lookup-column-within-PowerApps/m-p/174190/thread-id/58032#M58033 

     

    @Anonymous

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard