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 / ComboBox and Person field
Power Apps
Answered

ComboBox and Person field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

So hopefully I can explain this properly 🙂

I have a SharePoint list that has a person column and a single line of text column

Now in PowerApps I have a combobox, and I'm wondering a way to filter by the text column and only return the matching users to the combobox?  I hope I explained this well enough 🙂

Categories:
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    I assume the text field has multiple users with email id's with some separator

    StalinPonnusamy_0-1635483628732.png

     

    Set the Items property of the Person Combo box to

     

    Filter(
     Office365Users.SearchUser({}), 
     Mail in (Split(EmailidsDataCardValue.Text,",")) 
    )

     

     

    StalinPonnusamy_2-1635483916016.png

     

     

    Set the Update property of Card to

     

    {
     Claims: "i:0#.f|membership|" & AssignedToCombo.Selected.Mail,
     Department: "",
     DisplayName: AssignedToCombo.Selected.DisplayName,
     Email: AssignedToCombo.Selected.Mail,
     JobTitle: "",
     Picture: ""
    }

     

     

    Set the DefaultSelectedItems property to

    {
     Claims: "i:0#.f|membership|" & ThisItem.'Assigned to'.Email,
     Department: "",
     DisplayName: ThisItem.'Assigned to'.DisplayName,
     Email: ThisItem.'Assigned to'.Email,
     JobTitle: "",
     Picture: ""
    }

     

    Assigned to - Person Column in Sharepoint


    Thanks,
    Stalin - Learn To Illuminate

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    No the text field contains other info, let's say a dept. for example. I want the combobox to display the person column of everyone that has a matching dept.
    I'll look over what you suggested and see if it can point me in the right direction - but it's still early 🙂

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    For this only one change which items property and remaining steps are same

     

    Set, the Items property of the Person Combo box to 

    Filter(
     Office365Users.SearchUser({}), 
     Department = DepartmentLabel.Text
    )

     

    We can also reference a column instead of label when we use Form.

    Filter(
     Office365Users.SearchUser({}), 
     Department = ThisItem.Department
    )

    StalinPonnusamy_1-1635510750022.png

     

    Note:  Set the combo box layout to Person to display more information

    StalinPonnusamy_2-1635510787137.png

     


    Thanks,
    Stalin - Learn To Illuminate

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Unfortunately not, it's not the actual Dept property, that was a bad example for me to use.

    Screen Shot 2021-10-29 at 8.50.27 AM.png

    I want to filter the the items that have 'something' in their singleLineOfText column and return those Users to the combobox

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    On the screen, You have a dropdown to select the department and the combo box should only display only those department users.

     

    UI : 

    Dropdown - Displays all Department

    Combo - Persons which filter based on department selection

     

    Is it your requirement?

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sort of - it's a little more static than that, in that you can't select the filter. The combobox should only show the users who have 'something' in their singleLineOfText column (if using the SS above as the example)

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    after lots of trial/error

    Distinct(Filter('SP List',choiceColumn.Value="desiredChoice"),'personColumn'.DisplayName).Result

  • chanbar Profile Picture
    6 on at

    How to default it to login user? Any idea

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Setting the DefaultSelectedItems property of the ComboBox to the following is I believe what you're looking for

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

  • chanbar Profile Picture
    6 on at

    Thank you, but my data list is excel online. I know its the worst one. But having to make do with it, until we move to sharepoint 😞

     

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 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard