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 III
Super User III

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 III
Super User III

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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,714)