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 / Display Names via Stat...
Power Automate
Answered

Display Names via Status from excel

(0) ShareShare
ReportReport
Posted on by

Hello everyone!

I'm trying to create an automate date will display the names of a certain people based on their status. Thank in advance for the help.

Data in Excel

JB261_3-1680677899305.png

 


Here the flow that I created but it's displayed all names not based on the status.

JB261_0-1680677707255.pngJB261_1-1680677745724.png

 

JB261_2-1680677811594.png


Here's the output.

JB261_4-1680678047817.pngJB261_5-1680678069153.pngJB261_6-1680678086537.png


what I want the output is they will be in 1 message and the names will be based on the status.
Duty

Juan Dela Cruz

WFH
Juan Dela Cruz 1

RD
Juan Dela Cruz 2

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,623 Super User 2026 Season 1 on at

    Do I understand correctly, there could be multiple people with the same status?

  • Verified answer
    Chriddle Profile Picture
    8,623 Super User 2026 Season 1 on at

    I don't like looping over table rows and using variables:

     

    Chriddle_1-1680691334034.png

     

    Compose: Some sample data

     

    [
     {"Name": "Jim", "Status": "DUTY"},
     {"Name": "John", "Status": "WFH"},
     {"Name": "Jane", "Status": "RD"},
     {"Name": "Jenny", "Status": "DUTY"}
    ]

     

     

    Apply to each Status: Loop over an array with all statuses

     

    ["DUTY", "WFH", "RD"]

     

     

    StatusPerson: Compose action to get the names per status and format it to text

     

    concat(
    	items('Apply_to_each_Status'),
    	decodeUriComponent('%0A'),
    	join(
    		xpath(
    			xml(json(concat('{"root":{"person":', outputs('Compose'),'}}'))),
    			concat('//person[Status="',
    			items('Apply_to_each_Status'),
    			'"]/Name/text()')
    		),
    		decodeUriComponent('%0A')
    	)
    )

     

    Here you have to adapt outputs('Compose') to your data array.

     

    Message: Compose action to combine all StatusPersons

     

    join(
    	outputs('StatusPersons'),
    	concat(
    		decodeUriComponent('%0A'),
    		decodeUriComponent('%0A')
    	)
    )

     

    Outputs:

     

    DUTY
    Jim
    Jenny
    
    WFH
    John
    
    RD
    Jane

     

     

  • Chriddle Profile Picture
    8,623 Super User 2026 Season 1 on at

    Or everything in one action:

    Chriddle_0-1680692661916.png

    StatusPersons: Compose action

    concat(
    	'DUTY',
    	decodeUriComponent('%0A'),
    	join(
    		xpath(
    			xml(json(concat('{"root":{"person":', outputs('Compose'),'}}'))),
    			concat('//person[Status="DUTY"]/Name/text()')
    		),
    		decodeUriComponent('%0A')
    	),
    	decodeUriComponent('%0A'),
    	decodeUriComponent('%0A'),
     	'WFH',
    	decodeUriComponent('%0A'),
    	join(
    		xpath(
    			xml(json(concat('{"root":{"person":', outputs('Compose'),'}}'))),
    			concat('//person[Status="WFH"]/Name/text()')
    		),
    		decodeUriComponent('%0A')
    	),
    	decodeUriComponent('%0A'),
    	decodeUriComponent('%0A'),
     	'RD',
    	decodeUriComponent('%0A'),
    	join(
    		xpath(
    			xml(json(concat('{"root":{"person":', outputs('Compose'),'}}'))),
    			concat('//person[Status="RD"]/Name/text()')
    		),
    		decodeUriComponent('%0A')
    	),
    	decodeUriComponent('%0A')
    )

    Same output as above.

     

  • Chriddle Profile Picture
    8,623 Super User 2026 Season 1 on at

    Or the really simple approach with a slightly different output.

    Just sort the rows by Status and use a HTML table:

    Chriddle_0-1680696472676.png

     

    Create HTML table:

     

    {
     "inputs": {
     "from": "@sort(outputs('Compose'), 'Status')",
     "format": "HTML",
     "columns": [
     {
     "header": "Status",
     "value": "@item()['Status']"
     },
     {
     "header": "Name",
     "value": "@item()['Name']"
     }
     ]
     }
    }

     

     

    Outpus:

    Chriddle_1-1680696721933.png

     

  • JB261 Profile Picture
    on at

    Hi @Chriddle yes you are correct it could many people with the same status.

  • JB261 Profile Picture
    on at

    Thank you so much I used this method and it's working but the names are not arrange/organized. I already try adding <br> in concat fx and join fx but didn't work, do you have any idea on how I should do it?

    Output

    JB261_3-1681106933551.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard