cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ppei
Level 8

Is it possible to count names in a multiple selection people picker?

I searched and didn't find any answers. There is a video for Infopath, but none for PowerApps. I wonder if it is possible to count names in a multiple selection people picker field in PowerApps. 

 

Thanks,

Pei Pei

2 ACCEPTED SOLUTIONS

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Is it possible to count names in a multiple selection people picker?

You can use the CountRows function with the SelectedItems property of the picker as the parameter. For example, if your people picker is in a combobox named 'DataCardValue6', then you can use this expression in a label to display the number of selected names:

"People selected: " & CountRows(DataCardValue6.SelectedItems)

View solution in original post

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Is it possible to count names in a multiple selection people picker?

If you really need to store that number in your list, then you can add an additional column in the list, and update it anytime the list of selected people is changed.

View solution in original post

4 REPLIES 4
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Is it possible to count names in a multiple selection people picker?

You can use the CountRows function with the SelectedItems property of the picker as the parameter. For example, if your people picker is in a combobox named 'DataCardValue6', then you can use this expression in a label to display the number of selected names:

"People selected: " & CountRows(DataCardValue6.SelectedItems)

View solution in original post

ppei
Level 8

Re: Is it possible to count names in a multiple selection people picker?

Thank you, Carlos. I just tested and it worked. What I am trying to do is to save the number in my SharePoint list. Should I create a field to store this number or do you have any suggestions on that?

 

Thanks again.

 

Pei

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Is it possible to count names in a multiple selection people picker?

If you really need to store that number in your list, then you can add an additional column in the list, and update it anytime the list of selected people is changed.

View solution in original post

ppei
Level 8

Re: Is it possible to count names in a multiple selection people picker?

Thank you. I have added the column and set the default with your formula. After I save the form, the list is updated with the count. Great!

 

I appreciate your help.

 

Pei 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,862)