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 / Populating people pick...
Power Apps
Answered

Populating people picker based on choice field

(0) ShareShare
ReportReport
Posted on by 31

Hi everyone

I am trying to find a way of automatically populating a people picker field in a PowerApps SharePoint form based on the value of a separate choice field.  I have an approval form and want users to be able to choose from a small list of approvers without having to search for them.  However, I've tried using a people picker with a person field on the SharePoint list that points to an approvers SharePoint group but this won't allow users to display all people in this group.

My solution to this would be to create a choice field with the 6 names of approvers.  I want the approver people picker field to then automaticaly populate with the user that is chosen from the choice field but can't get this to work.  The people picker field is expecting a record type and the choice field can only provide text values.

Is this possible?

Thanks in advance for your help.

Categories:
  • Mr-Dang-MSFT Profile Picture
    Microsoft Employee on at

    Hi @gjayne84,

    It sounds like you want to have a SharePoint list that has a Person/Group column for selecting multiple people. But rather than showing all possible people, you only want it to show the people who are valid approvers.

     

    Here's how I would set up a Person column in a combobox in a form:

     

    Single-select Person column 
    Items: Choices(ListName.ColumnName)
    DefaultSelectedItems: Parent.ColumnName

     

    Multi-select Person column shown in a combobox inside a gallery
    Items: Choices(ListName.ColumnName)
    DefaultSelectedItems: Parent.ColumnName

     

    Parent.ColumnName would show the value that has been saved.

     

    If the approvers would not change, I would suggest collecting each of them to a collection.

  • gjayne84 Profile Picture
    31 on at

    Hi @Mr-Dang-MSFT

    Thanks for the swift response.  I only need to select a single approver but my setup is shown below:

    Fields.PNG

    The choice field is a normal choice field with text values:

    Choice field.PNG

    In the above example, if I clicked John Doe in the normal choice field it should then automatically populate the people picker field with John Doe.  Ideally I would prefer to just have the people picker field behave in the same way as the choice field where the list of approvers appears without having to search for them by name, but I understand this isn't currently possible in PowerApps.

  • Mr-Dang-MSFT Profile Picture
    Microsoft Employee on at

    @gjayne84,

    Can you clarify why you need two different columns for approvers? I am not following.

     

    What is the difference between the two columns?

  • gjayne84 Profile Picture
    31 on at

    @Mr-Dang-MSFT

    The ApproverChoiceField is a normal choice column:

    ApproverChoiceField.PNG

    The ApproverPersonField is a Person or Group column:

    ApproverPersonField.PNG

    As people in our company may not know the names of the approvers they need to be able to pick from a list rather than having to search for them by name.  Ideally I don't want to have the two columns but having a choice field with the approvers names, which then populates the actual people picker field seemed like the only way of achieving this?  I've tried linking the person or group column to a SharePoint group that only contains the approvers but the PowerApps people picker control still requires the user to type in a name to show them.

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

    HI @gjayne84,

    Do you want to populate the Person field within your Edit form automatically based on the selected approver name within the Choice field?

    I have made a test on my side, please take a try with the following workaround:1.JPG

     

    2.JPG

    Firstly, you need to add a Office 365 Users connection within your app.

    Within the Edit form (SharePointForm1), set the DefaultSelectedItems property of the Combo Box control within the ApproverPersonField Data card to following:

    If(
     SharePointForm1.Mode=FormMode.New,
     {
     Claims: "i:0#.f|membership|" & Lower(LookUp(Office365Users.SearchUser(),DisplayName = DataCardValue3.Selected.Value,Mail)),
     DisplayName: DataCardValue3.Selected.Value,
     Email: LookUp(Office365Users.SearchUser(),DisplayName = DataCardValue3.Selected.Value,Mail),
     Department:"",
     JobTitle:"",
     Picture: ""
     },
     Parent.Default
    )

    Note: The DataCardValue3 represents the Combo Box control within the ApproverChoiceField Data card.

    On your side, you shoukld type:

    If(
     SharePointForm1.Mode=FormMode.New,
     {
     Claims: "i:0#.f|membership|" & Lower(LookUp(Office365Users.SearchUser(),DisplayName = YourApproverChoiceComboBox.Selected.Value,Mail)),
     DisplayName: DataCardValue3.Selected.Value,
     Email: LookUp(Office365Users.SearchUser(),DisplayName = YourApproverChoiceComboBox.Selected.Value,Mail),
     Department:"",
     JobTitle:"",
     Picture: ""
     },
     Parent.Default
    )

    Please check the attached GIF screenshot for more details:

     

    Best regards,

    Kris

    Test.gif
  • AlbertoSP Profile Picture
    118 on at

    How would I go about about populating the people picker filed automaticaly from a SharePoint list based on Lookup action?


    Depending on the Contract Type I select, the People picker should populate the Purchace Manager name  handing that contract Type

    I can get a lable populated with the correct Purchace manager using the formula below
    LookUp('Contract Types', ContractType=fld_Contract_Type.Selected.Value).Purchasing_x0020_Manager.Email

    How would I used that to populate a peple's picker field.?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @gjayne84  @Mr-Dang-MSFT 

    I am suffering from the same issue. People Picker fields that connect to a SharePoint group (to fetch some users as an approver not all AD users) in PowerApps doesn't show as a dropdown. Although it show the control as dropdown but won't allow user to open that dropdown. Instead, It only allows users to search by typing the name which would be an issue once users don't know the name of those approvers.

    Have you found a solution/workaround for that?

    How we can tell PowerApps to show list of those values as a real dropdown that user can choose from?05.PNG

  • DNS4ever Profile Picture
    13 on at

    Great, this was exactly what I was looking for. Just a note, that search didn't work for me, so the code I needed to Adjust was more like:

    Screen.OnVisible:

    Set(gvCurrentUser, Office365Users.MyProfileV2())

     

    Action modified search

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

     

    Regards,

    Dennis

  • kmw1130 Profile Picture
    995 on at

    I am using your example to do something similar.  My scenario is that I have a dropdown from a 2nd list that populates text fields (a user being one of those fields), but since it is a text field and not a person field, I would also like to update my person field with the same value that is in the text field.  On the screen it populates it as it should but when I try to save I get an error message saying:

    "The requested operation is invalid.  Server Response:  ListA failed:  The specified user i:0#.f|membership| could not be found.  Client RequestID:......."

     

    UPDATE:  I am not getting BadGateway

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard