cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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
Anonymous
Not applicable

Using Combo boxes now

 

bthibeault18
Advocate II
Advocate II

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?

Anonymous
Not applicable

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.

Anonymous
Not applicable

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))

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

Anonymous
Not applicable

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,986)