cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
niclasdahl
Level: Powered On

How can I avoid mulitple layers of nesting when trying to get 'inner' properties of meta data

I have this flow for uploading and updating documents in a central repository, and in that flow, i would like to send an e-mail to the person that uploads a document to the repository The e-mail should informing them that the file has been uploaded properly, which essential meta data it has been tagged with and also include sharing links.

 

This is currently giving me some problems, as I want to put the 'inner' property/parameter of the term (not sure if it's the proper name for it) called "DisplayName" of the Authors, Approvers, Owners (people columns) as well as "Labels" from Keywords (Ent.Keywords) into that mail. But, when I try to do that, the flow will start nesting. Which would be fine if it was just one level of nesting, but each property/term (auth, own, appr, keyword) will initiate a new level of nesting, In this case it puts be over the limit of 8 levels of nesting. 

 

Is the a way for me to get this "inner property" and put it into a mail without having to have all these levels of nesting?

 

It is possible to get all of the properties of the term by using "@body('Get_file_properties')['Author0']"

 

But that looks really crappy in the mail that is sent out.... i just want the Displayname/Label. I atempted to insert "[DisplayName]" into the string, but that didn't work and i got this returned: 

'Send_an_email_(V2)_2' inputs at line '1' and column '21757': 'The template language expression 'body('Get_file_properties')['Author0']['DisplayName']' cannot be evaluated because property 'DisplayName' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

 

Get file properties - Outputs.png

 
 

Trying to get inne propreties from outputs.png

 

1 REPLY 1
PowerBack19
Level 8

Re: How can I avoid mulitple layers of nesting when trying to get 'inner' properties of meta data

It looks as if the values (meta data) you are pulling are "arrays". Then these array values need to be put into a single "string" value to input into the email. I would suggest using the Join Data Operation action. This will allow you join the array values into a single string output that you can then input into the email message.

 

Here is a link: https://docs.microsoft.com/en-us/power-automate/data-operations#use-the-join-action

Helpful resources

Announcements
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,793)