cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RaulSG
Frequent Visitor

Filter Choices person column of SharePoint

Hello everyone!

I have a person column in a SharePoint list. In a PowerApps, I present into a form this field with:

Items = Choices(SharePointListName.PersonField) and works fine and presents all the users of my tenant.

 

But I need to filter these choices only for people belonging to a group that I have in a table variable (varGroup) that has 3 users. I put this:

Items = Filter(Choices(SharePointListName.PersonField); Email in varGroup.mail) and don't show anything and don't allow to display the combobox.

 

How can I do this?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @RaulSG ,

 

According to your description, I've made a test for your reference:

 

1\ This is my variable ‘Variables’.

v-xiaochen-msft_0-1615431642362.png

 

 

2\ Set Items property of combo box control in form to:

ForAll(varGroup,{Claims:"i:0#.f|membership|"&ThisRecord.UserEmail,Email:ThisRecord.UserEmail,Department:"",DisplayName:"",JobTitle:"",Picture:""})

 

3\ Set other properties of combo box control like picture:

v-xiaochen-msft_1-1615431642371.png

 

 

4\ The result is as follows:

v-xiaochen-msft_2-1615431642373.png

 

v-xiaochen-msft_3-1615431642374.png

 

// Email1 is a person column.

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @RaulSG ,

 

According to your description, I've made a test for your reference:

 

1\ This is my variable ‘Variables’.

v-xiaochen-msft_0-1615431642362.png

 

 

2\ Set Items property of combo box control in form to:

ForAll(varGroup,{Claims:"i:0#.f|membership|"&ThisRecord.UserEmail,Email:ThisRecord.UserEmail,Department:"",DisplayName:"",JobTitle:"",Picture:""})

 

3\ Set other properties of combo box control like picture:

v-xiaochen-msft_1-1615431642371.png

 

 

4\ The result is as follows:

v-xiaochen-msft_2-1615431642373.png

 

v-xiaochen-msft_3-1615431642374.png

 

// Email1 is a person column.

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

RaulSG
Frequent Visitor

Thank you very much @v-xiaochen-msft !

It's a strange way of solving it but it works perfectly. I just need to be able to search by name in the combobox but it works for me.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,258)