cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
af5555
New Member

Drop down to filter gallery from multiple choice column

Hi, my data is in a SharePoint list called "OKR - Business Team"

I'm trying to filter a gallery using a drop-down.

 

The drop-down needs to contain choices from a multiple-choice column called "Team"

 

I found a tutorial on YouTube that suggested

Distinct('OKR - Business Team',Team)

 

Unfortunately, with this in the drop down the result is a blank drop-down. There are items in the drop-down but they are invisible and do nothing.

I have checked and it's not a text color issue.

 

The code for the Gallery filter also failed so I won't bother posting it here.

 

Does anyone have a better way to filter a gallery using a drop-down menu with the multiple choice column as the source?

 

thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
af5555
New Member

Thanks for responding all!

I kept digging and this is what I found:

 

Dropdown control:

Choices('OKR - Business Team'.Team)

Gallery:

Filter('OKR - Business Team', Team.Value = Dropdown2.Selected.Value)

Its working!

View solution in original post

7 REPLIES 7
AlexanderGjr
Regular Visitor

For drop down items use:

Choices('OKR - Busines Team'.Team)

 

for gallery items use

Filter('OKR - Business Team', IsBlank(ddFachbereich.Selected.Value) || IsEmpty(ddFachbereich.Selected.Value) || ddFachbereich.Selected.Value in Fachschulen.Value)
Drrickryp
Super User
Super User

@AlexanderGjr 

I'm not sure why this works but it does:

Sort(Distinct('OKR - Business Team',Team),Result) // for a single line of text

Sort(Choices('OKR - Business Team'.Team),Value)  // for a Choices type column

You keep referring to a dropdown control but these do not permit multiple selection.  Combobox controls do. 

To filter a gallery based on a multiselect combobox:

Filter('OKR - Business Team', Team.Value in Combobox1.SelectedItems) // for a Choices type column

Filter('OKR - Business Team', Team  in Combobox1.SelectedItems)  // for a single line of text type column

@Drrickryp, tried your code in my app, unfortunately is not working for me 😕

Drrickryp
Super User
Super User

@AlexanderGjr 

I made some changes (vide supra)  but I am not sure what you actually have.  Is Teams a Choice type column or a single line of text? 

@Drrickryp 

Sort(Choices('OKR - Business Team'.Team),Value) // for a Choices type column

this one is working for me, as in my case the column is type choice, I guess it will too for @af5555  due to:

>> from a multiple-choice column called "Team"

 

>> You keep referring to a dropdown control but these do not permit multiple selection.

no need for me, guess will work by cascading dropdowns if necessary

@Drrickryp 

Sort(Choices('OKR - Business Team'.Team),Value) // for a Choices type column

this one is working for me, as in my case the column is type choice, I guess it will too for @af5555  due to:

>> from a multiple-choice column called "Team"

 

>> You keep referring to a dropdown control but these do not permit multiple selection.

no need for me, guess will work by cascading dropdowns if necessary

af5555
New Member

Thanks for responding all!

I kept digging and this is what I found:

 

Dropdown control:

Choices('OKR - Business Team'.Team)

Gallery:

Filter('OKR - Business Team', Team.Value = Dropdown2.Selected.Value)

Its working!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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 (1,768)