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?
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
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:
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,
@Oskarkuus - In your app start prop please use this code to filter display name from people picker field -
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.