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

Filtering SharePoint list based on Multichoice inputs

I have a SharePoint List which contains user data like Name, Age, Language spoken, Country, etc. I am using a PowerApps form to input data into this list, where only Language Spoken is multi choice field.

 

Now I want to filter the list based on a selected user and the languages they speak. For e.g.

 

NameAgeLanguagesCountry
ABC25-35English,RussianUSA
XYZ35-45German,SpanishMexico
CDE25-25Russian,JapaneseUSA
MNO45-55English,FrenchCanada

 

So when I select ABC user from a Dropdown in PowerApps, connected gallery should show user names of CDE and MNO as ABC user speaks in English like user MNO and Russian also spoken by user CDE. They can further filter the gallery based on country and age as well.

 

Filtering Gallery based on Age and Country has been completed using

Filter(userList, uniqueID <> Value(selectedUserID.Text),AgeRange.Value = AgeRange_1.Selected.Value, Country = Country_1.Selected.Value)

 

Can someone help on how to filter the list based on Languages spoken by selected user?

 

Thanks,

AK

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @AKB2021 ,

 

I did a demo for you.

 

1\ This is my list .

vxiaochenmsft_0-1623903871558.png

 

2\ Add a dropdown control 'userList.NAME' and set its Items property to:

userList.NAME

 

3\ Add a gallery control and set its Items property to:

Filter(ForAll(Filter(userList,NAME<>Dropdown1.Selected.NAME) As A,If(CountRows(Filter(ForAll(LookUp(userList,NAME=Dropdown1.Selected.NAME).Languages As B,If(B.Value in A.Languages.Value,B)),!IsBlank(Value)))>0,A)),!IsBlank(NAME))

 

4\ The result is as follows:

vxiaochenmsft_1-1623903991011.png

vxiaochenmsft_2-1623903998622.png

vxiaochenmsft_3-1623904008792.png

 

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

 

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @AKB2021 ,

 

I did a demo for you.

 

1\ This is my list .

vxiaochenmsft_0-1623903871558.png

 

2\ Add a dropdown control 'userList.NAME' and set its Items property to:

userList.NAME

 

3\ Add a gallery control and set its Items property to:

Filter(ForAll(Filter(userList,NAME<>Dropdown1.Selected.NAME) As A,If(CountRows(Filter(ForAll(LookUp(userList,NAME=Dropdown1.Selected.NAME).Languages As B,If(B.Value in A.Languages.Value,B)),!IsBlank(Value)))>0,A)),!IsBlank(NAME))

 

4\ The result is as follows:

vxiaochenmsft_1-1623903991011.png

vxiaochenmsft_2-1623903998622.png

vxiaochenmsft_3-1623904008792.png

 

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

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,469)