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

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
MVP

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
MVP

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





Thank you so much! 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,076)