cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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

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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (9,296)