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 / Sharepoint Person colu...
Power Apps
Unanswered

Sharepoint Person column - filter and limit choices that are scrollable?

(0) ShareShare
ReportReport
Posted on by 1,097

I have a sharepoint list with a person column (listing all users in my tenant).

 

1. How can i in Powerapps filter the combobox so that it excludes all users that starts with a specific set of characthers?

I want to filter out some users.... But i am not successfull trying to apply the filter function the the Item property of the combobox.

 

2. How can i limit how many options the user sees when he clicks on the combobox. I dont want the user to be able to scroll through all users, i want the user to only be able to Search in the combobox?

 

 

Categories:
I have the same question (0)
  • FlowMohit Profile Picture
    64 on at

    @Oskarkuus - In your app start prop please use this code to filter display name from people picker field - 

    • ForAll('Name Of Your SP List',Collect(colPersonName,PeopleColumnName.DisplayName))
    • Go to combobox and set it's items property to  - Filter(colPersonName,!StartsWith(Value,"whateveryouwanttoexclude"))

    As per my knowledge there are no options available to control the no of results in the cmb box. You can only search within what you can see in the combobox.

     

     

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

    Hi @Oskarkuus ,

    For your first question, do you want to filter the available options within the Person Picker Up ComboBox?

     

    Based on the needs that you mentioned, I afraid that there is no direct solution to achieve your needs. It is an known issue with Person Picker column of SP List in canvas app -- when you apply a Filter formula to the Person Picker ComboBox, the Person Picker ComboBox would not show up any results. So I think the Filter(Choices([@'SP List].PersonColumn), StartsWith(DisplayName, "test")) could not achieve your needs.

     

    As an alternative solution, I think the Office 365 Users connection could achieve your needs. The user @karlagb20 has faced similar needs with you, please check my response within the following thread:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Dropdown-choices-People-picker-field/m-p/437988

     

    On your side, you consider add a Office 365 Users connection in your app. Then unlock the Person Picker field data card in your Edit form, set the Items property of the Person Picker ComboBox to following:

    Filter(
     Office365Users.SearchUser({searchTerm: PersonPickerComboBox.SearchText, top:999}), 
     !StartsWith(DisplayName, "Type the filter text here") // excluede users start with a specific text
    )

    Note: The top property within the Office365Users.SearchUser() could limit the returned user results, the Maximum value is 999, in other words, you could only return 999 users at most from your org once time.

    Set the Update property of the Person field data card in your Edit form to following:

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

    Set the DefaultSelectedItems property of the Person Picker ComboBox to following:

    LookUp(Office365Users.SearchUser(), Mail = ThisItem.PersonField.Email)

     

    For your second question, if you want to limit the user options within the Person Picker ComboBox, I think the top property within the Office365Users.SearchUser() could achieve your needs.

    If you want the user not to be able to scroll through all users (based on above solution), instead, only be able to Search in the ComboBox, I afraid that there is no way to achieve your needs in PowerApps currently.

     

    Best regards,

  • EmmaWatt Profile Picture
    96 on at

    Hi Kris, @https://community.powerplatform.com/profile/?userid=768E5901-808F-44D7-AF40-E87C6753EB96

    I have a similar issue with the People Column not filtering, but I am not using a picker, I am just filtering on a collection on the People column matching the current user, but users are not seeing their own selection when running the app, I raised a question on this yesterday and as yet no replies https://powerusers.microsoft.com/t5/Building-Power-Apps/Power-Apps-Collection-based-on-SP-list-does-not-show-a-user-in-a/m-p/2490806

    Many thanks

    Emma

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard