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

Trying to filter a dropdown list filled with people name into a Gallery

Hey guys,

 

As the title states, I am trying to get a dropdown list filled with people name to load different things into a Gallery like this exercise (https://youtu.be/kLGglidmPxg?t=224) is doing. I am working from a SharePoint list, and initially had no problem to generate all the projects, and now I would like to be able to sort all of them by Director.

 

Right now, all the names are generating in the dropdownlist list with this code in the Items property : 

 

Distinct(
AddColumns(
Projects,
"Director",
'Project Director'.DisplayName
),
Director

 

Then here is my problem, I go to my Gallery and in the Items property I tried to use this code without any luck, nothing will generated in the Gallery

Filter(Projects, 'Project Director' = DropdownDirector.Selected.'Project Director')

 

I know the column name are right, they are a person field loaded into a SharePoint list.

 

Thanks for your help, it is much appreciated.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Jebediah ,

You cannot filter directly by complex field types (which is a one of the good reasons for not using them - a have a blog that may interest you)

Filter(
   AddColumns(   
      Projects, 
      "Director",     
      'Project Director'.DisplayName
   ),
   Director = DropdownDirector.Selected.'Project Director'
)

 This will only work up to list numbers of your Delegation limit (500-2,000)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

@Jebediah ,

I could not agree more - that code however should work as it is referring to the correct field value.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @Jebediah ,

You cannot filter directly by complex field types (which is a one of the good reasons for not using them - a have a blog that may interest you)

Filter(
   AddColumns(   
      Projects, 
      "Director",     
      'Project Director'.DisplayName
   ),
   Director = DropdownDirector.Selected.'Project Director'
)

 This will only work up to list numbers of your Delegation limit (500-2,000)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Hi Warren,

 

Once again thanks for your help, I have about 10 names in that list. I have tried the code you have provided me in the Gallery Items Property and I wasn't able to generate anything on it.

 

 

Jebediah
Frequent Visitor

I'm starting to think change that SharePoint column to a text field might sure be the best option. 

@Jebediah ,

I could not agree more - that code however should work as it is referring to the correct field value.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,009)