cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

How to CDS Dynamic Content 'Lookup-Entity Primary Field'

I'm making a Flow that requires Dynamic Content from a Lookup Entity. I would like to return and use the Primary Field ('Name') from that Lookup Entity. It only displays options for the ID Value or the "Type" 
hsV9Gs2.png
Please tell me I can do this easily without having to manually create an Array in the flow with the ID and Primary Field... 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How to CDS Dynamic Content 'Lookup-Entity Primary Field'

Hi @Reylin 

 

Thanks for you explanation.

 

Yes that is the limitation of lookup field in CDS connector. You have two options here.

 

1. Use the expand query see the below post

http://linnzawwin.blogspot.com/2019/12/power-automate-list-records-use-expand.html

 

2.  If you are using Dynamics then you can construct a FetchXML using the related entity and execute via CDS connector. To execute the CDS FetchXML query you need to create a solution, create flow, search for Common Data Service. Here you can see two CDS data connections. Select the second one from the list called Default Environment - Power Action Step List Records Here you can see FetchXML query option.

 

Thanks

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: How to CDS Dynamic Content 'Lookup-Entity Primary Field'

Hi @Reylin 

 

I am not sure I understood it correctly. So the lookup generally give you the text and id (GUID). If you looking the lookup entity (Name field) then you need to retrieve that entity to get the related value.

 

If I am wrong please explain a bit more about your scenario.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Advocate I
Advocate I

Re: How to CDS Dynamic Content 'Lookup-Entity Primary Field'


@abm wrote:

Hi @Reylin 

 

I am not sure I understood it correctly. So the lookup generally give you the text and id (GUID). If you looking the lookup entity (Name field) then you need to retrieve that entity to get the related value.

 

If I am wrong please explain a bit more about your scenario.

 

Thanks


Lookup only gave me GUID and type, not text. I want the text. I am surprised I do not get the primary field (text, name, title, whatever you wanna call it). 
I have to make Flow 'get' the entire Lookup Entity in order to get the primary field? 
I can do that... But if the Lookup Entity is very large, does that slow the flow down? It might be more efficient to just manually create an array with the names I need. 

Sorry, I'm just surprised that I can't return such an essential field of the entity. You'd think the Primary Field would be important, but I guess only GUID is

Highlighted
Super User
Super User

Re: How to CDS Dynamic Content 'Lookup-Entity Primary Field'

Hi @Reylin 

 

Thanks for you explanation.

 

Yes that is the limitation of lookup field in CDS connector. You have two options here.

 

1. Use the expand query see the below post

http://linnzawwin.blogspot.com/2019/12/power-automate-list-records-use-expand.html

 

2.  If you are using Dynamics then you can construct a FetchXML using the related entity and execute via CDS connector. To execute the CDS FetchXML query you need to create a solution, create flow, search for Common Data Service. Here you can see two CDS data connections. Select the second one from the list called Default Environment - Power Action Step List Records Here you can see FetchXML query option.

 

Thanks

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Highlighted
Advocate I
Advocate I

Re: How to CDS Dynamic Content 'Lookup-Entity Primary Field'

Thanks for your solutions! 
Maybe Microsoft will update this action/feature someday. Especially because of their explanation of what Primary Field is supposed to be: 
fPUVv6w.png

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (10,873)