web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch multiselect comb...
Power Apps
Answered

Patch multiselect combobox into SharePoint multi person field by retaining existing values.

(0) ShareShare
ReportReport
Posted on by 77
ForAll(
    colUpdate_SharedCollections,
    Patch(
        GS_Shared_Greenhouse,
        LookUp(
            GS_Shared_Greenhouse, ID = colUpdate_SharedCollections[@ID]
        ),
        {
            SharedUsers: cbxUsers_SharedCollections.SelectedItems
        }
    )
)
Hi everyone,
 
The code patches the values from the combobox into SharedUsers(Multi person field in SharePoint). However, it is removing the existing values in "SharedUsers" when I patch it. I would like to retain the existing values, how do I do that?
 
Thanks
Categories:
I have the same question (0)
  • Verified answer
    narayan225 Profile Picture
    2,547 Super User 2025 Season 2 on at
    Generally when using combo-box, you render the combo-box with the list of items that are already selected and when you select more items, it patches the existing ones and the new one seamlessly.
     
    Because you want to patch the multi-choice field with both the existing selection as well as the new ones, you will need to first store the existing items in a collection.
    Then, use the selected items property to add new items into that collection and later patch the collection to the multi-choice column in SharePoint.
     
    ClearCollect(existingchoiceslist,LookUp(DataSource,LookUpCondition.Column); //this will store the column data to the existinchoiceslist collection.
    ForAll(existingchoicelist, Collect(choicelist, ThisRecord)); //This is to look out for duplicates
    Collect(choicelist, comboBox.SelectedItems); //This will then create a final collection with both existing value and selected values
    After this you can try and patch the column using the above formula that you provided.
     
    hope this works.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 321

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 311 Super User 2025 Season 2

Last 30 days Overall leaderboard