cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bsims
Level: Powered On

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
Community Support Team
Community Support Team

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

Hi @bsims ,

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
Community Support Team
Community Support Team

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

Hi @bsims ,

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
bsims
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (3,721)