web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help Required in dropd...
Power Apps
Answered

Help Required in dropdown Filter based on Multiselect Person or Group column data

(0) ShareShare
ReportReport
Posted on by 108

Hi Team,

 

I have Sharepoint with two columns.

Column 1 - Team Name - Choice DataType

Column  2 - Team Heads - Person or Group  (Multi select is enabled) 

Data Source:

suriyamv07_0-1679035951622.png

 

In my powerapps, i have one dropdown to select the Team name and based on that team selection, their respective data's will be populated to the gallery.

 

For example, When John login to the system, based on User().Email validation , he should get "Finance, Credit, Accounting" in the dropdown. 

 

I tried to use Filter(Datasource_name, User().Email in 'Team Head Name'.Email). I couldn't bring the exact team details in dropdown. 

 

Could anyone please help on this.

 

Thanks

 

 

Categories:
I have the same question (0)
  • MaximusDecimus Profile Picture
    281 on at

    Hi @suriyamv07 

     

    Well this one was more difficult than I expected, I replicated your data source on SharePoint and was able to get the drop downs to filter by doing the below:

     

    ClearCollect(colForm, Ungroup(test,"TeamHeadName"));
    ForAll(colForm, Collect(colForm2, {name: DisplayName, team: 'Team Name'.Value}))

    I had the above set to run on button select, but you can set this to run OnStart or wherever else you may need.

     

    First line will ungroup all the Team Head Names so each one is on a new row

    Second line creates another collection which extracts the team name as this column is returned as a record initially.

    This then leaves you with a collection with 2 columns, name and team name. At this point you can set this new collection as the source for your drop down and apply your filter to it as you would normally.

     

    One thing to note - for me User().Email would return a different email than what the person type column would in SharePoint, I can only assume this is how my org is set up, so I used User().FullName - but you may need to tweak it here.

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @suriyamv07,

    Have you solved your problem?

     

    @MaximusDecimus, your solution is totally different with the nomal direction we will refer to when dealing with this kind of issue, but it is a good idea. It could solve the delegation issue as well, excellent idea!😃

     

    I think this is a normal issue related to multi select Person field, actually the following formula for Items property of your dropdown control will solve it directly:

    ForAll(Filter(List,User().Email in TeamHeadName.Email),TeamName.Value)

    vqiaqimsft_0-1679304072535.png

     

  • suriyamv07 Profile Picture
    108 on at

    @v-qiaqi-msft : This provided direct solution to my problem. Thanks a lot 🙂

     

    @MaximusDecimus Thanks for the response 🙂 

  • suriyamv07 Profile Picture
    108 on at

    @v-qiaqi-msft One more help, 

     

    In the same list, i have three person or group column with multiselect option. 

     

    Column 1 - Person or group - Level 1 manager

    Column 2 -  Person or group - Level 2 manager

    Column 3 -  Person or group - Level 3 manager

     

    Based on the logged in user, "Team Name" dropdown should display the values. 

     

    As per your previous comments, I have applied it to the 1st person or group column (Level 1 manager) and its working. 

     

    I have applied the same to other two columns as like below, 

     

    If(
     !IsEmpty(varLevel1Manager),
     ForAll(
     Filter(
     'List Name',
     User().Email in 'Level 1 Manager'.Email
     ),
     'Team Name'.Value
     ),
     
     !IsEmpty(varLevel2Manager),
     ForAll(
     Filter(
     'List Name',
     User().Email in 'Level 2 Manager'.Email
     ),
     'Team Name'.Value
     ),!IsEmpty(varLevel3Manager),
     ForAll(
     Filter(
     'List Name',
     User().Email in 'Level 3 Manager'.Email
     ),
     'Team Name'.Value
     )
    )

     

     I have the test data respective to the row of Level 3 Manager column and i could see the data in the Powerapps Result set screen, But unable to see the result in Preview mode.

    Test error.PNG

     

    Below is the response from Preview mode,

    suriyamv07_1-1679424115242.png

     

     Kindly help me to get the result on preview mode.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard