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

How to get multiple user's name from a share point list ?

Hi, 

I would like to ask, 

I'm facing a issue when I want to create a HTML table by get user's name from Share Point List, in the SP list column : Assigned Owner, contain two user. When I want get the value into HTML table, the output it will show " @odate.type " / "Email" / " Picture" / etc. I would like to get the "Display Name" only. 

 

Assigned Owner

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser","Claims":"|membership|userA@email.com","DisplayName":"UserA","Email":"userA@email.com","Picture":"picture of userA","Department":" ABC ","JobTitle":"work"},[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser","Claims":"|membership|userB@email.com","DisplayName":"UserB","Email":"userB@email.com","Picture":"picture of userB","Department":" DEF ","JobTitle":"work"},

 

Wish To Get:

Assigned Owner

UserA , UserB

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi  @Calven_Chow ,

 

I made a sample for you.

vxiaochenmsft_0-1667540829772.png

vxiaochenmsft_1-1667540850517.png

vxiaochenmsft_2-1667540887515.png

{"Display Name":@{join(body('Select'),',')}}

vxiaochenmsft_3-1667540918151.png

 

Best Regards,

Wearsky

View solution in original post

v-xiaochen-msft
Community Support
Community Support

Hi @Calven_Chow ,

 

I think the 'Assign to' filed is a person/group field which allows multiple selections, right?

Please try to remove the 'Apply to each 2' action and add the Select and 'Append to array variable' again.

The point is to input the expression manually instead of using the dynamic content.

In you case, try these expression:

 

Select From: items('Apply_to_each')?['Assign to']

Select Map: item()?['DisplayName']

 

Besides, I found that you hadn't click on the button of the select action, please click it first and then fill in the Map parameter.

vxiaochenmsft_0-1668065151490.png

 

Hope it makes sense.

 

Best Regards,

Wearsky

View solution in original post

7 REPLIES 7
v-xiaochen-msft
Community Support
Community Support

Hi  @Calven_Chow ,

 

I made a sample for you.

vxiaochenmsft_0-1667540829772.png

vxiaochenmsft_1-1667540850517.png

vxiaochenmsft_2-1667540887515.png

{"Display Name":@{join(body('Select'),',')}}

vxiaochenmsft_3-1667540918151.png

 

Best Regards,

Wearsky

@v-xiaochen-msft 

As the following the step above, it show: 

 

Display Name

-----------------------

{"userA":"},{"userA":"},

{"userB":"},{"userB":"},

{"userA":"},

{"userC":"},{"userC":"}

 

How can I get the format as the outputs above ? Will it because of to apply_to_each showing on the flow ? (the apply_to_each created automatically after I select "Assigned to"

Calven_Chow_0-1667545858077.png

 

v-xiaochen-msft
Community Support
Community Support

Hi @Calven_Chow ,

 

Could you expand all actions and show all expressions?

 

Best Regards,

Wearsky

@v-xiaochen-msft 

Sure sure,

Flow:

Calven_Chow_8-1667547363335.png

Calven_Chow_9-1667547403354.png

Calven_Chow_10-1667547423874.png

 

SP List:

Calven_Chow_13-1667547558523.png

 

Outputs:

Calven_Chow_12-1667547478857.png

 

v-xiaochen-msft
Community Support
Community Support

Hi @Calven_Chow ,

 

Sorry for late reply.

I noticed that you have a nested 'Apply to each' action in your flow.

vxiaochenmsft_0-1668064218382.png

Please remove it.

 

Best Regards,

Wearsky

Calven_Chow
Frequent Visitor

Hi @v-xiaochen-msft ,

 

The "Apply to each" unable to be remove, i believe is because of the "value" that i collect in the SP List. 

When I choice "Assign to" in [Select], it will automatically create "Apply to each"|

 

Any other way to have remove the "Apply to each" ?

 

Thank You

 

Calven

v-xiaochen-msft
Community Support
Community Support

Hi @Calven_Chow ,

 

I think the 'Assign to' filed is a person/group field which allows multiple selections, right?

Please try to remove the 'Apply to each 2' action and add the Select and 'Append to array variable' again.

The point is to input the expression manually instead of using the dynamic content.

In you case, try these expression:

 

Select From: items('Apply_to_each')?['Assign to']

Select Map: item()?['DisplayName']

 

Besides, I found that you hadn't click on the button of the select action, please click it first and then fill in the Map parameter.

vxiaochenmsft_0-1668065151490.png

 

Hope it makes sense.

 

Best Regards,

Wearsky

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (1,460)