Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Patching Combo Box whose items = Office365Users.SearchUser({searchTerm:Self.SearchText,top:999}) which is a multi select to Share Point list column named 'business sponsor' which of person or group type and is multi select

Like (0) ShareShare
ReportReport
Posted on 28 Aug 2023 08:45:48 by 8

Patching Combo Box whose items = Office365Users.SearchUser({searchTerm:Self.SearchText,top:999}) which is a multi select to share point list column named 'business sponsor' which of person or group type and is multi select.

please tell me the code for this. 

I am also facing one more issue that I am able to patch the combo box items to share point list column and when I click on edit button on the gallery it hovers me to the edit form , but now when I click on submit button , it does patch the already selected values of my people picker combo box, rather it will only patch the values when I reselects the new values in the combo box.

please provide me the correct code for the implementation.

  • v-jefferni Profile Picture
    on 28 Aug 2023 at 09:31:10
    Re: Patching Combo Box whose items = Office365Users.SearchUser({searchTerm:Self.SearchText,top:999}) which is a multi select to Share Point list column named 'business sponsor' which of person or group type and is multi select

    It's the DefaultSelectedItems property.

     

    Best regards,

  • upadharp Profile Picture
    8 on 28 Aug 2023 at 09:26:40
    Re: Patching Combo Box whose items = Office365Users.SearchUser({searchTerm:Self.SearchText,top:999}) which is a multi select to Share Point list column named 'business sponsor' which of person or group type and is multi select

    what property to be set to this code? for the Business Sponsor combo box i have two properties :-
    Items: Office365Users.SearchUser({searchTerm:Self.SearchText,top:999})

    defaultselecteditems:Parent.Default // as i am using a form

    onselect(submit button):Patch(
    File,
    LookUp(File, Title= Edit_ProjectID_Text_Input.Text),
    {
    Title:Edit_ProjectID_Text_Input.Text,
    'Business Sponsor': ForAll(
    Edit_BusinessSponsor_ComboBox.SelectedItems,
    {
    Claims:ThisRecord.Mail,
    Department:"",
    DisplayName:ThisRecord.DisplayName,
    Email:ThisRecord.Mail,
    JobTitle:"",
    Picture:""} // Replace with the appropriate property name
    )

    please tell me where to edit the code , it would be of great help

  • v-jefferni Profile Picture
    on 28 Aug 2023 at 09:18:00
    Re: Patching Combo Box whose items = Office365Users.SearchUser({searchTerm:Self.SearchText,top:999}) which is a multi select to Share Point list column named 'business sponsor' which of person or group type and is multi select

    Hi @upadharp ,

     

    This is because the DefaultSelectedItems of Combo box doesn't match the Items of the Control. You should set it as below:

     

    ForAll(ThisItem.sponsor As SP, LookUp(Office365Users.SearchUser({searchTerm:SP.Email,top:999}), Mail = SP.Email))

     

     

    Best regards,

  • upadharp Profile Picture
    8 on 28 Aug 2023 at 09:01:29
    Re: Patching Combo Box whose items = Office365Users.SearchUser({searchTerm:Self.SearchText,top:999}) which is a multi select to Share Point list column named 'business sponsor' which of person or group type and is multi select

    ForAll(
    Edit_BusinessSponsor_ComboBox.SelectedItems,
    {
    Claims:ThisRecord.Mail,
    Department:"",
    DisplayName:ThisRecord.DisplayName,
    Email:ThisRecord.Mail,
    JobTitle:"",
    Picture:""} // Replace with the appropriate property name
    )
    i have used this to patch, but when i am clicking on edit button in my gallery , it takes me to the edit form screen, now if i do not update the business sponsor combo box that is i keep it as it is without changing any selected values, and click on submit the business sponsor column in the sharepoint list do not get filled with any values and it is empty.

  • v-jefferni Profile Picture
    on 28 Aug 2023 at 08:56:01
    Re: Patching Combo Box whose items = Office365Users.SearchUser({searchTerm:Self.SearchText,top:999}) which is a multi select to Share Point list column named 'business sponsor' which of person or group type and is multi select

    Hi @upadharp ,

     

    You can use blow code for the Person column in Patch function:

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

     

    Best regards,

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 72 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard
Loading started