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 / Shareopint poeple pick...
Power Apps
Answered

Shareopint poeple picker multiselct -default selected items

(0) ShareShare
ReportReport
Posted on by 25

Hi,

 

I have a form, which connects to a sharepoint list, where there is a field "Gäste", which is multi select and a sharepoint people pickers field.

In the field I make items of the combo box from an office lookup due to restrictions with the normal choices() Method:

'Office365-Benutzer'.SearchUser({searchTerm: Self.SearchText; top: 999})

To transform it to the sharepoint people format, I use the following code in the surrounding data cards "update" property:

ForAll(DataCardValue37.SelectedItems;
 {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser";
 Claims: Concatenate(
 "i:0#.f|membership|";
 Mail
 );
 DisplayName: DisplayName;
 Email: Mail
 }
)

I can save multiple persons and also remove one or two and save. But I can't add one to existing 2 and then save. That results in a patch error.

 

I think that is because in my combobox I used just "parent.default" for defaultSelectedItems.

So I looked at the structure of the Office connectors respond and tried the following code:

ForAll(Parent.Default;
 {
 AccountEnabled: false;
 BusinessPhone: [];
 City: "";
 CompanyName: "";
 Country: "";
 Department: "";
 DisplayName: DisplayName;
 GivenName: "";
 Id: "";
 JobTitle: "";
 Mail: Email;
 MailNickname: "";
 OfficeLocation: "";
 PostalCode: "";
 Surname: "";
 TelephoneNumber: "";
 UserPrincipalName: "";
 mobilePhone: ""
 }
)

But the formula is erroneus. It doesn't know "Email" and "DisplayName" behind the colon. I thought those might be in parent.default. I also can't glance into "Parent.Default" - IntelliSense doesn't allow.

 

Does someone has a hint?

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @andyarty - what you have in the Items property of the ComboBox control is fine.

     

    For the Update property, use:

     

    ForAll(
     DataCardValue37.SelectedItems As _selections,
     {
     DisplayName: _selections.DisplayName,
     Claims: "i:0#.f|membership|" & Lower(_selections.Mail),
     Department: "",
     Email: _selections.Mail,
     JobTitle: "",
     Picture: ""
     }
    )

     

    For the DefaultSelectedItems property of the ComboBox, use:

     

    If(
     !IsBlank(ThisItem.Gäste),
     ForAll(
     ThisItem.Gäste As _selections,
     First('Office365-Benutzer'.SearchUser({searchTerm: _selections.Email}))
     )
    )

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard