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

PowerApps O365Users Patch to CDS Lookup Users

I have a combobox in PowerApps that is connected to my O365Users so i can search through our users and select a name and in my CDS, i have a lookup to users field.  I am trying to patch the PowerApps O365User to CDS but i get getting an error with my formula.  

 

In the past, I have done the same thing with SharePoint and i had to use the below string for the patch to name.  Can someone please assist me with how i can patch the O365 user in PowerApps to the Lookup User field in CDS?  This is driving me crazy.

 

{Physician:'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",ODataType:Blank(),Claims:Concatenate("i:0#.f|membership|",ComboBox2.Selected.Mail),Department:"",DisplayName:ComboBox2.Selected.DisplayName,Email:ComboBox2.Selected.Mail,JobTitle:"",Picture:""})

 

Physician is the name of the field in CDS and ComboBox2 is my field in PowerApps.

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: PowerApps O365Users Patch to CDS Lookup Users

Hi @LongRiders971 ,

 

 

The data structure of lookup field in CDS is not the same with Person Column in Sharepoint list.

The lookup field in CDS can be taken as the record reference from the parent entity, so you need to patch a record of parent entity to the lookup field. Please try this:

 

Patch('Entity', Defaults('Entity'),{Physician:LookUp(Users, 'Primary Email'=ComboBox2.Selected.Mail)})

 

 

Hope this helps.

Sik

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: PowerApps O365Users Patch to CDS Lookup Users

Hi @LongRiders971 ,

 

 

The data structure of lookup field in CDS is not the same with Person Column in Sharepoint list.

The lookup field in CDS can be taken as the record reference from the parent entity, so you need to patch a record of parent entity to the lookup field. Please try this:

 

Patch('Entity', Defaults('Entity'),{Physician:LookUp(Users, 'Primary Email'=ComboBox2.Selected.Mail)})

 

 

Hope this helps.

Sik

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,566)