cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User
Super User

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

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!





View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

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

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!





View solution in original post

Highlighted
Advocate I
Advocate I

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

Thank you so much! 

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 (6,374)