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

Search and filter using mutilpe dropdowns and search input a gallery

Attempting to create a auto populate search input and/or use the dropdown filters to populate the selected items I have in the gallery

 

Successfully, the search input works ONLY after clicking the search icon I created. However, I would like for the search input to auto popluate within gthe gallery.

 

For the dropdown filters, the "Status", "Platform", "Phase" dilters works. 

 

"DOC" toggle works ONLY if one or all filters have something selected. It will clear the gallery if UNSELECTED, which there are items that are false for is to popluate and it doesnt show. 

 

"Review" toggle does NOT work at all and confused on how the code is not reading it.

 

If there are any suggestions, please do help. Here is the code below:

 

Sort(
Filter(
Projects,
(!IsBlank(
LookUp(
searchItems,
Result in 'Project Title',
Result
)
) || !IsBlank(
LookUp(
searchItems,
Result in 'Project Phase'.Value,
Result
)
) || !IsBlank(
LookUp(
searchItems,
Result in 'Project Status'.Value,
Result
)
) || !IsBlank(
LookUp(
searchItems,
Result in 'Primary Platform'.Value,
Result
)
) || IsEmpty(searchItems)) && If(
!IsEmpty(PhaseBox_1.SelectedItems),
'Project Phase'.Value in PhaseBox_1.SelectedItems,
true

)&& If(
!IsEmpty(PlatformBox_1.SelectedItems),
'Primary Platform'.Value in PlatformBox_1.SelectedItems,
true
)&& If(
!IsEmpty(StatusBox_1.SelectedItems),
'Project Status'.Value in StatusBox_1.SelectedItems,
true
)
&& DOCToggle_2.Value = DOC && ReviewToggle_1.Value = 'PMO Review'
),
'Project Phase'.Value,
If(
SortDescending1,
Descending,!
Ascending
)
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Search and filter using mutilpe dropdowns and search input a gallery

Hi @Anonymous ,

Do you want to filter data according to 1serchbox, 3drop downs and 2toggles?

Since drop down and toggle have default selected item, you do not need to justify their null.

Try this formula:(set the formula to the gallery's Items)

Sort(
           If(IsBlank(searchbox.Text ),
              Filter(Projects,
                                      'Project Phase'.Value in PhaseBox_1.SelectedItems,
                                      'Primary Platform'.Value in PlatformBox_1.SelectedItems,
                                      'Project Status'.Value in StatusBox_1.SelectedItems,
                                       DOCToggle_2.Value = DOC,
                                       ReviewToggle_1.Value = 'PMO Review'
                         )

               Filter(Projects,
                                      searchbox.Text in 'Project Title' ||
                                      searchbox.Text in 'Project Phase'.Value ||
                                      searchbox.Text in 'Project Status'.Value ||
                                      searchbox.Text in 'Primary Platform'.Value,
                                      'Project Phase'.Value in PhaseBox_1.SelectedItems,
                                      'Primary Platform'.Value in PlatformBox_1.SelectedItems,
                                      'Project Status'.Value in StatusBox_1.SelectedItems,
                                       DOCToggle_2.Value = DOC,
                                       ReviewToggle_1.Value = 'PMO Review'
                           )
                  )
          'Project Phase'.Value,
          If(
             SortDescending1,
             Descending,!
             Ascending
             )
        )

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
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

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Search and filter using mutilpe dropdowns and search input a gallery

Hi @Anonymous ,

Do you want to filter data according to 1serchbox, 3drop downs and 2toggles?

Since drop down and toggle have default selected item, you do not need to justify their null.

Try this formula:(set the formula to the gallery's Items)

Sort(
           If(IsBlank(searchbox.Text ),
              Filter(Projects,
                                      'Project Phase'.Value in PhaseBox_1.SelectedItems,
                                      'Primary Platform'.Value in PlatformBox_1.SelectedItems,
                                      'Project Status'.Value in StatusBox_1.SelectedItems,
                                       DOCToggle_2.Value = DOC,
                                       ReviewToggle_1.Value = 'PMO Review'
                         )

               Filter(Projects,
                                      searchbox.Text in 'Project Title' ||
                                      searchbox.Text in 'Project Phase'.Value ||
                                      searchbox.Text in 'Project Status'.Value ||
                                      searchbox.Text in 'Primary Platform'.Value,
                                      'Project Phase'.Value in PhaseBox_1.SelectedItems,
                                      'Primary Platform'.Value in PlatformBox_1.SelectedItems,
                                      'Project Status'.Value in StatusBox_1.SelectedItems,
                                       DOCToggle_2.Value = DOC,
                                       ReviewToggle_1.Value = 'PMO Review'
                           )
                  )
          'Project Phase'.Value,
          If(
             SortDescending1,
             Descending,!
             Ascending
             )
        )

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
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: Search and filter using mutilpe dropdowns and search input a gallery

Yes, I'm aiming to have the serach input and dropdowns and toggles filter in the gallery. 

Each in assigned to a label within the gallery and I noticed the jusitfy their null wasnt needed.

 

I tried the formula and now this is what I'm getting:

 

Attempting to add the operators, possibly missing commas???

 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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