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 / How do i patch a multi...
Power Apps
Answered

How do i patch a multi select person column without deleting previous entries?

(1) ShareShare
ReportReport
Posted on by 330
I am trying to update a multi select person SharePoint column with the patch below. This patch statement removes all others already in the column, and then adds only the new one. 
 
Patch(
   myList,
	LookUp(
	  myList, ID = Value(Param("ID"))),
	  {
	    myColumn: Table (
              {
		'odata.typr': "@Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
		Claims: User().Email,
		DisplayName: User().FullName,
		Department: "",
		Email: User().Email,
		JobTitle: "",
		Picture: ""	    
	      })
   	  }      
   );
 
 
How do i get to append the new user into the column, without deleting the previous names in the column?
Categories:
I have the same question (0)
  • Suggested answer
    AmínAA Profile Picture
    1,228 Moderator on at
    Greetings Spawn10!
     
    I'm not entirely sure I understand what you're trying to achieve, but If I'm not mistaken, you want your code to concatenate the previous table you had, with a new t able, as in appending the new values to the column as a table after the table you already had . . . If that's the case then this implementation might work, altough I'm not sure since I've never done this one like this before!
    Patch(
        myList,
        LookUp(
            myList,
            ID = Value(Param("ID"))
        ),
        {
            myColumn: 
            Concat(
                myColumn,
                Table(
                    {
                        'odata.type': "@Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                        Claims: User().Email,
                        DisplayName: User().FullName,
                        Department: "",
                        Email: User().Email,
                        JobTitle: "",
                        Picture: ""
                    }
                )
            )
        }
    )
     
    Hopefully this does solve your problem, if that's the case, feel free to mark this reply as an answer, otherwise feel free to reply for further help as well!
  • Suggested answer
    WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at
    Hi  Spawn10,
    You need to get the existing content first, then patch it all back as a Table. Your first part also needs to be converted to this format first.
    With(
       {
          _Record: 
          LookUp(
             myList,
             ID = Value(Param("ID")))
          )
       },
       Patch(
          myList,
          {
             ID: _Record.ID,
             myColumn: 
             Table(
                {
                   Claims: "i:0#.f|membership|" & Lower(User().Email),
                   DisplayName: User().FullName,
                   Department: "",
                   Email: User().Email,
                   JobTitle: "",
                   Picture: ""
                },
                _Record.myColumn
             )
          }
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • Verified answer
    Spawn10 Profile Picture
    330 on at
    To patch to the multi select people column in SharePoint, without deleting the users already in the item, this is what I ended up doing...
    //collect current users
    ClearCollect(currentUsers,LookUp(myList,ID = Value(Param("ID"))).myColumn);
    
    //add current user
    Collect(currentUsers
    {
    	'odata.typr': "@Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    	Claims: User().Email,
    	DisplayName: User().FullName,
    	Department: "",
    	Email: User().Email,
    	JobTitle: "",
    	Picture: ""	    
    });
    
    //then patch
    Patch(myList, First(Filter(myList, ID = Value(Param("ID"))))),{myColumn:currentUsers});
    That seems to have done the trick. Still open to learning a better way, if there is. 
  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at
    You will find what I posted is much simpler and does not leave a collection "hanging around" in the app resources.

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard