cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Filter a gallery by multiple dropdown's

 

Hello All,

 

I am trying to create a gallery that will be filtered by multiple dropdowns. I have 2 questions.

 

#1 

I have been able to create one dropdown correct because the column for it in SharePoint has "Choices" already, such as they have to choose between "Collections","CAT", etc...

The code I used was : Choices('Training Requests'.Process)

 

But how can I make the other dropdowns choices be from a single line of text column? Where the user doesn't have choices, but have to write an answer. I want those answers to be in the dropdown.

 

#2

I have created a Request Form app in which all information given goes to a SharePoint List using patch():

SharePoint Requests.png 

I am now creating an Admin Page for this request app so that higher ups can review the requests coming in. I am trying to create a Gallery that will be filtered by multiple dropdowns. I also want for them, higher ups, to be able to either use one dropdown or multiple dropdowns to filter a search. Not only being able to use one dropdown per search.

 

Heres my Search/Filter Page:

Search Page.png

 

Heres what I am trying to make my gallery look like:

Request Select Page_LI.jpg

 

SharePoint List name :  Training Requests

 

Columns that I would like to be in a dropdown that will filter the Gallery:

ID (The normal SharePoint generated one)

Process (The column that already through SharePoint has 5 Choices)

TrainingPOC (This column in SharePoint is a single line of text)

 

Hope someone can help! Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Filter a gallery by multiple dropdown's

Hi @Anonymous ,

Could you please share a bit more about the Delegation warning isue within your formula?

How many records existed in your SP List? More than 2000?

 

Please consider take a try with the following workaround:

Set the Items property of the ID ComboBox to following:

Distinct('Training Requests', ID)

Set the Items property of the Process ComboBox to following:

Choices('Training Requests'.Process)

Set the Items property of the Traing POC ComboBox to following:

Distinct('Training Requests', TrainingPOC)

 

Set the Items property of the Gallery to following:

Filter(
       'Training Requests', 
        If(
            IsBlank(SearchByID.Selected.Result), 
            true, 
            ID = Value(SearchByID.Selected.Result)  // Modify formula here
       ),
      If(
           IsBlank(SearchByProcess.Selected.Value), 
           true, 
           Process.Value = SearchByProcess.Selected.Value   // Modify formula here. Type Process.Value rather than Process
      ), 
      If(
         IsBlank(SearchByTrainingPOC.Selected.Result), 
         true, 
         TrainingPOC = SearchByTrainingPOC.Selected.Result
      )
)

Please consider take a try with above solution, then check if the issue is solved.

 

If the amount of your SP List records is not more than 2000, you could ignore the Delegation warning issue with above formula.

Note: Please make sure you have set the "Data row limit for non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Anonymous
Not applicable

Re: Filter a gallery by multiple dropdown's

Using Combo boxes now

 

Highlighted
Advocate II
Advocate II

Re: Filter a gallery by multiple dropdown's

You can use the Filter function on the Items of the gallery:

Filter(DataSourceName,IDDropDown.Selected.Value = ID, ProcessDropDown.Selected.Value = Process.Value, TrainingPOCTextInput.Text in TrainingPOC)

 

Will the user have to select values in each drop down each time? Or can they apply the filters with some that are blank?

Highlighted
Anonymous
Not applicable

Re: Filter a gallery by multiple dropdown's

Thanks for the reply! I will definitely try it out. 

 

The user will be able to leave some blank. Choose which combobox's they want to filter the gallery by. I switched to Combobox's so that leaving it blank could be an option.That's pretty much where I am also stuck. Finding the code to apply any ones they do want to filter by and not wanting to filter by. Whether that be choosing to filter by 2 combobox's and not the others or vise versa. Hope that makes sense.

I know that code will be in the "Items" code for Gallery.

Highlighted
Anonymous
Not applicable

Re: Filter a gallery by multiple dropdown's

Hello, Thanks for the reply. I tried that one and doesn't seem to work. I have gotten a code that doesnt show any errors, but won't be processed due to Delegation.

 

The code I am using right now:

Filter('Training Requests', If(IsBlank(SearchByID.Selected.Result), true, ID=SearchByID.Selected.Result) && If(IsBlank(SearchByProcess.Selected.Value), true, Process=SearchByProcess.Selected.Value) && If(IsBlank(SearchByTrainingPOC.Selected.Result), true, TrainingPOC=SearchByTrainingPOC.Selected.Result))

Highlighted
Community Support
Community Support

Re: Filter a gallery by multiple dropdown's

Hi @Anonymous ,

Could you please share a bit more about the Delegation warning isue within your formula?

How many records existed in your SP List? More than 2000?

 

Please consider take a try with the following workaround:

Set the Items property of the ID ComboBox to following:

Distinct('Training Requests', ID)

Set the Items property of the Process ComboBox to following:

Choices('Training Requests'.Process)

Set the Items property of the Traing POC ComboBox to following:

Distinct('Training Requests', TrainingPOC)

 

Set the Items property of the Gallery to following:

Filter(
       'Training Requests', 
        If(
            IsBlank(SearchByID.Selected.Result), 
            true, 
            ID = Value(SearchByID.Selected.Result)  // Modify formula here
       ),
      If(
           IsBlank(SearchByProcess.Selected.Value), 
           true, 
           Process.Value = SearchByProcess.Selected.Value   // Modify formula here. Type Process.Value rather than Process
      ), 
      If(
         IsBlank(SearchByTrainingPOC.Selected.Result), 
         true, 
         TrainingPOC = SearchByTrainingPOC.Selected.Result
      )
)

Please consider take a try with above solution, then check if the issue is solved.

 

If the amount of your SP List records is not more than 2000, you could ignore the Delegation warning issue with above formula.

Note: Please make sure you have set the "Data row limit for non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Filter a gallery by multiple dropdown's

Gallery Items Worked like a charm. Thank You!

 

The only problem I have now is that the SharePoint list will eventually surpass 2000 records. What do I do then?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,358)