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

Don't get "DisplayName" from my people column of my sharepoint list displayed in HTML table

Hallo,

my problem is that I don't get the "DisplayName" from my people column of my sharepoint list displayed in a HTML table.

I create my tables like this. First 'Get items' -> 'Select'-> 'Create HTML table'

I already tried this in the select operatin for the HTML column "worker":

item()?['PeopleColumn']?['DisplayName'] (It didn't work but I have seen it has worked for certain people)

In addition, I do not get displayed in the dynamic content, the "PeopleColumn DisplayName", which I have now also seen several times

 

I also tried diffrent Expression to filter the "DisplayName" but without success.

I know I can extract it with a 'Parse Jason' operation but if I add the people column as content it automatically creates me an 'Apply to each'. So I can't use the extracted "DisplayName" in my 'Select' operation.  This must not end in an 'Apply to each' because I am merging several HTML tables to create a PDF. 

 

If somone has a solution I would be very happy, thanks.

4 REPLIES 4
ekarim2020
Community Champion
Community Champion

The DisplayName of your Person field should be available as dynamic content. In my demo list below, Owner is a Person only type column:

ekarim2020_0-1631659836913.png

In the Select action I map Owner to the Owner DisplayName using dynamic content:

ekarim2020_1-1631660056233.png

And here is the output of the flow, which uses the Create HTML table action. The table showing the Display Name:

ekarim2020_3-1631660507956.png

Ellis

 

MaxF
Frequent Visitor

Hallo Ellis,

thank you for your answer

I think the problem is that allow multiple selection is on yes. Because when I changed it to no, it worked. 
But I need that multiple selection for Power Apps. Or is there another way to select multiple people in powerapps and then store them as individual items in the sharepoint list?

 

Max

ekarim2020
Community Champion
Community Champion

I'm not clear on the question, but seems to be at least two options:

(1) Update the multi-person SharePoint column from within Power Apps

PATCH A SharePoint Person Column With Multiple People In Power Apps - Matthew Devaney

 

(2) Extract the Display Names from the multi-person SharePoint column into an array or string variable. Then save to another SharePoint column or return the values back to Power Apps:

ekarim2020_0-1631732022481.png

The Owner field is an array of JSON objects:

 

"Owner": [
    {
        "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        "Claims": "i:0#.f|membership|alexw@MS365.com",
        "DisplayName": "Alex Wilber",
        "Email": "AlexW@MS365.com",
        "Department": "Marketing",
        "JobTitle": "Marketing Assistant"
    },
    {
        "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        "Claims": "i:0#.f|membership|meganb@MS365.com",
        "DisplayName": "Megan Bowen",
        "Email": "MeganB@meganb@MS365.com",
        "Department": "Marketing",
        "JobTitle": "Marketing Manager"
    },
    {
        "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        "Claims": "i:0#.f|membership|meganb@MS365.com",
        "DisplayName": "Isaiah Langer",
        "Email": "meganb@MS365.comm",
        "Department": "Sales",
        "JobTitle": "Sales Rep"
    }
]

 

A flow to extract the Owner display names:

ekarim2020_1-1631733014271.png

ekarim2020_2-1631733174398.png

Ellis

 

ekarim2020
Community Champion
Community Champion

See also this related post for selecting multiple people a SharePoint Person field using an array variable. 

https://powerusers.microsoft.com/t5/Building-Flows/RE-Import-excel-to-SharePoint-list-create-item-Is...


Ellis


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,895)