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 III
Super User III

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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (18,935)