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 Apps / Can't write multiple s...
Power Apps
Answered

Can't write multiple selected people back to SharePoint column

(0) ShareShare
ReportReport
Posted on by 104

I have worked my way through all of the past posts I can find on this topic, which has got me to the point where I am currently.

 

I have a combobox where the user can select multiple people and this should write back to a column in SharePoint. I am using the Office365Groups connector and after many hours of research, I've finally managed to get it to display the names, allow the selection and write them in a format that SharePoint can understand, however I'm now facing a situation where only the last person in the list ever gets written to the column in SharePoint. 

 

The relevant part of my patch function (all other parts working as expected) is:

 

 

 

 

 

Attendees:
 ForAll(DataCardValue12.SelectedItems,
 {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Department: "",
 Claims: "i:0#.f|membership|" & DataCardValue12.Selected.userPrincipalName,
 DisplayName: "",
 Email: "",
 JobTitle: "",
 Picture: ""
 })

 

 

 

 

 

 

For DataCardValue12:

 

 

 

 

 

Items = Office365Groups.ListGroupMembers("471b8aba-7b1a-426a-ba75-9b6008455b58").value

DefaultSelectedItems = LookUp(Office365Users.SearchUser(),Mail=User().Email)

 

 

 

 

 

 

Any help would be much appreciated.

Categories:
  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @teespolyglot 

     

    Please try this

    Attendees:
     ForAll(DataCardValue12.SelectedItems As Source,
     {
     Department: "",
     Claims: "i:0#.f|membership|" & Lower(Source.Selected.userPrincipalName),
     DisplayName: "",
     Email: Lower(Source.Selected.userPrincipalName),
     JobTitle: "",
     Picture: ""
     }
    )

     

    Make sure to pass email id with Lower


    Thanks,
    Stalin - Learn To Illuminate

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    I dont think that you need all fields.

    I think it should be like this:

     

    Attendees:
     ForAll(DataCardValue12.SelectedItems,
     {
     DisplayName: Office365Users.UserProfile(DataCardValue12.Selected.Email).DisplayName;
     Claims: "i:0#.f|membership|" & Lower(Result);
     UserPrincipalName: Office365Users.UserProfile(DataCardValue12.Selected.Email).UserPrincipalName
     })

     

    Also, You should use email instead of userPrincipalname

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

     

  • teespolyglot Profile Picture
    104 on at

    Thanks! This got me 99.9% of the way there. Once the "Source" was introduced, it opened up .mail for me to use, so my code ended up being:

    ForAll(DataCardValue12.SelectedItems As Source,
     {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Department: "",
     Claims: "i:0#.f|membership|" & Lower(Source.mail),
     DisplayName: "",
     Email: Lower(Source.mail),
     JobTitle: "",
     Picture: ""
     })
  • teespolyglot Profile Picture
    104 on at

    Thanks for your reply, I'd previously tried using the e-mail as the claims parameter, but DataCardValue12.Selected.mail wasn't an option. The only option available to me was userPrincipalName. To be fair I don't think I tried using & Lower(Result), so that might have worked.

     

    In any case it seems functional now using the solution proposed just before yours. Would there be any benefit to using the method you propose over the other solution that was suggested?

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    No... It would be the same...

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard