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 / New Form DataCardValue...
Power Apps
Answered

New Form DataCardValue with Office365Users.SearchUser Person Object

(0) ShareShare
ReportReport
Posted on by 3

I'm trying to Update DataCardValue (Sharepoint List Person Object)  with Office365Users.SearchUser({searchTerm: TextInput1.Text})  but i get error while submiting the form.

 

Please help.

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @sharonde ,

    Could you please share more details about the error message within your app?

    Do you want to update the Person column of your SP List with the result the Office365Users.SearchUser({searchTerm: TextInput1.Text}) formula returns when you open a New form?

    Where do you put the Office365Users.SearchUser({searchTerm: TextInput1.Text}) formula?

    Further, do you enable "Allow Multiple Selections" option for the Person column in your SP List?

     

    Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

    1. If the Person column is a Single selection column in your SP List:2.JPG

     

    3.JPG

    Set the DefaultSelectedItems property of the ComboBox within the Executor (Person column) data card in my Edit form to following:

    If(
     EditForm1.Mode = FormMode.New,
     {
     Claims:"i:0#.f|membership|" & Lower(First(Office365Users.SearchUser({searchTerm: DataCardValue9.Text})).Mail),
     DisplayName: First(Office365Users.SearchUser({searchTerm: DataCardValue9.Text})).DisplayName,
     Email: First(Office365Users.SearchUser({searchTerm: DataCardValue9.Text})).Mail,
     JobTitle:"",
     Department:"",
     Picture:""
     },
     Parent.Default
    )

    On your side, you should set the DefaultSelectedItems property of the ComboBox within the Person data card in your Edit form to following:

    If(
     EditForm1.Mode = FormMode.New,
     {
     Claims:"i:0#.f|membership|" & Lower(First(Office365Users.SearchUser({searchTerm: TextInput1.Text})).Mail),
     DisplayName: First(Office365Users.SearchUser({searchTerm: TextInput1.Text})).DisplayName,
     Email: First(Office365Users.SearchUser({searchTerm: TextInput1.Text})).Mail,
     JobTitle:"",
     Department:"",
     Picture:""
     },
     Parent.Default
    )

     

    2. If the Person column is a Multiple selections column in your SP List:

    Please set the DefaultSelectedItems property of the ComboBox within the Person data card in your Edit form to following (save multiple person values into the Person column in your SP list):

    If(
     EditForm1.Mode = FormMode.New,
     ForAll(
    Office365Users.SearchUser({searchTerm: TextInput1.Text}),
    {
    Claims:"i:0#.f|membership|" & Lower(Mail),
    DisplayName: DisplayName,
    Email: Mail,
    JobTitle:"",
    Department:"",
    Picture:""
    }
    ), Parent.Default )

     

    Please consider take a try with above solution I provided, then check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @sharonde how are you progressing with this? Was the above reply helpful?

     

    @Anonymous 

  • Kamolga Profile Picture
    7 on at

    The search function from text for the users did the trick in my edit form, after hours of different method trials, finally got it! The problem is only if I delete a person and leave it blank, it puts the first user user of the list, any idea how to upload blank if the combo is empty?

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