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

CDS: Is there a better way to map data that has a Lookup Entity?

I'm using a flow to create word documents containing data from a CDS entity. 

Normally I would use Select and do it easily like this screenshot example: 
7Mpi6Xe.png

but the "site" field is a Lookup entity, and therefore the dynamic content coming from the CDS flow action is only the GUID. I do not get the Name (primary field), only the GUID. So I can't map it with the dynamic content. 
The solution I found is a nested loop with a condition like this: 
MicrosoftTeams-image (1).png

but loops with conditions take time... nested loops take exponentially longer. I dread using this solution as it will make this flow's runtime extend from a few seconds to several minutes long.

Is there any way I can dynamically add the Site name from the lookup entity into the Select action? 
Like filter/switch code I could put into the mapping value... 
It seems like such a small thing that I need such a huge mess of a flow for. 

1 ACCEPTED SOLUTION

Accepted Solutions
Jcook
Super User
Super User

Hello @Reylin

Check out my blog to bypass the apply to each loop when getting a CDS value from lookup using list records:
https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Bypass-Apply-to-each-loop-on-singl...

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

2 REPLIES 2
Jcook
Super User
Super User

Hello @Reylin

Check out my blog to bypass the apply to each loop when getting a CDS value from lookup using list records:
https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Bypass-Apply-to-each-loop-on-singl...

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

Thank you so much! 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,999)