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 / How to update a People...
Power Apps
Unanswered

How to update a People Picker field from a combo box in PowerApps

(0) ShareShare
ReportReport
Posted on by 11

I have a PowerApps form that has 4 datasources - one is the main datasource (a list that stores information from the form) and the other datasources are used to populate comboboxes.  Two of the comboboxes I am having problems with are associated with the People Picker field.  I will use one as an example.  The datasource used to provide a list of names - the field in that list is a People Picker.  The combobox on my form pulls from that list using this formula:
Items:  Distinct('Executive Managers','EMG Name'.DisplayName)

Executive Managers is the name of the list and EMG Name refers to the name of the People Picker field.  The names display nicely in the combobox.  However, I can't get them to save back to the SharePoint list.  I have the Data layout set to "Person", the Primary text and SearchFields are set to "Result" (I can't seem to change this), and the Secondary text is set at "Email".  I tried doing a complicated "Update" formula on the data card(using odata.type, claims, etc) to no avail.  And then I tried a basic formula on the Update property:  cboExecMgr.Selected (where cboExecMgr refers to the combobox control).  That seemed to work once only.  When it worked that one time, the value doesn't appear in the field when the form is opened to that particular record.  Please note that I didn't use SharePoint Group to filter my combobox (which would have been the easier route) because that feature does not appear to be working.  

 

Does anyone have any recommendations? 

 

Categories:
I have the same question (0)
  • Ecki Profile Picture
    6 on at

    Hi, the only way to fill a people finder field for me is following ...

     

    In the Datacard I used this formula in the Update-property:

    {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser"; Claims: "i:0#.f|membership|"&User().Email; DisplayName: User().FullName}

     

    And the same formula in the DatacardValue in the DefaultSelectedItems-property:

    {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser"; Claims: "i:0#.f|membership|"&User().Email; DisplayName: User().FullName}

     

    I used User() because I needed the actual user. In your scenario you have to use your Dropdownbox.Value.

    I needed it for setting the value of an "author"-field.

     

    I hope this helps you

    best regards

    Ecki

  • v-xida-msft Profile Picture
    on at

    Hi @sposvc ,

    Which type column do you use to store the cboExecMgr selected value within your Main SP list? A Person type column or a Single text type column?

     

    Based on the needs that you mentioned, I assume that you also use a Person column in your Main SP List to store the cboExecMgr selected value, is it true?

     

    I think there is something wrong with the formula you typed within the Update property of the ExecMgr Data card in your Edit form. I have made a test on my side, please take a try with the following workaround:2.JPG

     

    3.JPG

    Firstly, you need to add a Office 365 Users connection within your app. Then set the Items property of the ComboBox (DataCardValue15) within the PersonColumn Data card in the Edit form to following:

    Distinct('20190325_case13',Executor.DisplayName)

    On your side, you should type:

    Distinct('Executive Managers','EMG Name'.DisplayName)

    Set the Update property of the PersonColumn Data card which contains the ComboBox control to following:

    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & Lower(LookUp(Office365Users.SearchUser(),DisplayName=DataCardValue15.Selected.Result).Mail),
     Department: "",
     DisplayName: DataCardValue15.Selected.Result,
     Email: LookUp(Office365Users.SearchUser(),DisplayName=DataCardValue15.Selected.Result).Mail,
     JobTitle: "",
     Picture: ""
    }

    On your side, you should type (set the Update property of the ExecMgr Data card (in your Edit form) which contains the cboExecMgr to following😞

    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & Lower(LookUp(Office365Users.SearchUser(), DisplayName = cboExecMgr.Selected.Result).Mail),
     Department: "",
     DisplayName: cboExecMgr.Selected.Result,
     Email: LookUp(Office365Users.SearchUser(), DisplayName = cboExecMgr.Selected.Result).Mail,
     JobTitle: "",
     Picture: ""
    }

    Note: I assume that the Person column in your Main SP List does not enable the "Allow multiple selections" option.

     

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

     

    Best regards,

  • sposvc Profile Picture
    11 on at

    In answer to your questions - yes, the Main SP List stores the values in People field and it only accepts a single entry.  I will try what you have recommended!  Also, how do I get the proper person to show up in this field when the PowerApp is opened to that particular item in Edit mode?  Should setting the default property to ThisItem.'Executive Manager' work even though the source is from another list?

     

    Thank you for your help!

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @sposvc ,

    If you want to get the proper person to show up in this field when the PowerApp is opened to that particular item in Edit mode, please take a try with the following workaorund:4.JPG

    Set the DefaultSelectedItems property of the ComboBox (on your side, it is cboExecMgr ) within the PersonColumn to following:

    {
     Result: ThisItem.PersonColumn.DisplayName
    }

    On your side, you should type following:

    {
     Result: ThisItem.YourPersonColumn.DisplayName /* <-- YourPersonColumn represents the Person column in your Main SP list */
    }

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • sposvc Profile Picture
    11 on at

    This worked perfectly!  Thank you!

  • Powerplatform01 Profile Picture
    386 on at

    You can watch this video

    https://youtu.be/w2I9ST1FeKw

  • powerdev38 Profile Picture
    9 on at

    Just replaced with ";" with "," in the above formula and it worked for me. Thanks, mate.

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard