web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Group array values ​​i...
Power Automate
Answered

Group array values ​​into another array

(0) ShareShare
ReportReport
Posted on by 5

Hi, I'm new to Power Automate and need help with a flow. I have a flow that will be executed via a button within a Power Bi panel. The flow receives data from a table that contains information about health system professionals, including name, profession, state and city where they work, among others. The idea is to be a flow to export the data into a personalized table with specific columns and send it by email to the user who clicked the button. However, there are some cases where the professional's information is duplicated, as they have more than one profession and work in more than one establishment. I need to use something similar to postgresql's string_agg where I group the values, which are making the professional line duplicate, by the | delimiter. I created a unique key for each professional in each array of values. Below are the attached images.

 

 

 

I need to get to this final array:

guijs0204_0-1719320979153.png

 

 

image.png
image.png
Categories:
  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @guijs0204 

    I test it in my side , this is my test flow:

    vyueyunmsft_0-1719364965274.png

    You can refer to my flow configuration:

    vyueyunmsft_1-1719365010939.png

    addProperty(item(),'Profissão',join( xpath( xml(json(concat('{"root":{"item":',outputs('Compor_Base_Duplicada'),'}}'))) , concat('/root/item[Chave="' , item()?['Chave'], '"]/Profissão/text()' )) , '|'))
     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     
     
     
  • guijs0204 Profile Picture
    5 on at

    Thank you friend. Helped me a lot!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard