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 / 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 Moderator 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard