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 / Problem with patching ...
Power Apps
Unanswered

Problem with patching to a SharePoint List Person column

(0) ShareShare
ReportReport
Posted on by 321

Hi,

I have an App where members of my team can create a profile, I have several column in my SP List. I have a PersonalID column which is the users Office365 Profile mailnickname and a column (person) called Display Name.

When the users create their profile the Personal Id is automatically written to the list. The problem is, I have only recently added the Display Name column, which is my person columm, so i am trying to get my App to automatically populate this using the Personal Id.

I have a gallery in my App which contains all the profiles in the list, and have added a comobox and put the defaultselcteditems code as

 

 

Office365Users.SearchUser({searchTerm: Trim(ThisItem.Personal ID)})

 

 

So this does as intended, it puts the Display Name of the person associated with that Personal Id into my combobox.

I then have the following code on a button

 

 

 

ForAll(
 Gallery1_2.AllItems,
 Patch(
 'MY SHAREPOINT LIST',
 LookUp('MY SHAREPOINT LIST', Personal Id = Gallery1_2.Selected.Personal Id),
 { Display Name column: ComboBox1.Selected }
 )
)

 

 


However this doesnt work, it doesnt patch anything to the person column.

However if I change the code on the defaultselecteditems to

 

 

ThisItem.Display Name person column

 

 

 It works as intended, and patches the display name in the combobox to my list. But This would mean changing all the name manually, there are too many so i need it to lookup the Personal Id column and auto populate the display name to the combobox.

Or if anyone else has a better way to do this, any help greatly appretiated.

Thanks


Categories:
I have the same question (0)
  • Sarita Suryawanshi Profile Picture
    74 on at

    Try this:

    Set the ComboBox's Items property to fetch Display Names based on Personal IDs:

    Office365Users.SearchUser({searchTerm: Trim(ThisItem.'Personal ID')}).displayName

    Modify your button's OnSelect property:

    ForAll(
     Gallery1_2.AllItems,
     Patch(
     'MY SHAREPOINT LIST',
     LookUp('MY SHAREPOINT LIST', 'Personal ID' = Gallery1_2.Selected.'Personal ID'),
     { 'Display Name column': ComboBox1.Selected.displayName }
     )
    )

     

  • realwillwright Profile Picture
    772 Moderator on at

    Hi @JimboSey 

     

    The format returned by searchuser is different to what is expected by SharePoint hence it not working, you will need to patch using the following, taken from a blog by Craig White. You will need to update your data sources and fields accordingly

     

    Patch(
     ComplexColumnsList,
     Defaults(ComplexColumnsList),
     {
     PersonSingle: {
     DisplayName: "",
     Claims: ComboBox1.Selected.Mail,
     Department: "",
     Email: "",
     JobTitle: "",
     Picture: ""
     }
     }
    )

     

    Patch Complex SharePoint Columns With Power Apps - Platforms of Power


    -------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard