cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
imelendez
Helper I
Helper I

Searching / Filtering issues on PowerApps

Hi,

I am currently having issues with searching and filtering with my application. Currently, I have a search box and two dropdowns that set the filtering. However, once I begin to use one of the dropdowns, it will not update the results until I have the other dropdown selected.

For example, I want to search "Nurse Practitioner; Female" with "No" selected for Casting and "Yes" selected for Incision & Drainage. It will work with all of those three values combined, but if I only search and select the "No" option for Casting, it will not show up until I selected an option from Incision & Drainage. Screenshots below to show my example.

imelendez_0-1637096875850.png

imelendez_1-1637096896668.png

imelendez_2-1637096910696.png

imelendez_4-1637096941952.png


All of the providers listed do not do casting but currently, the Incision & Drainage dropdown needs to be selected in order to get the results.

Also, is it possible to have each search box and dropdown list to work independently? Currently, the Casting dropdown has to be selected in order for the Incision & Drainage to work.

Below is the code I am using for the filtering of this gallery:

With({_searches: Filter(Split(TextSearchBox1, ";"), !IsBlank(Result))}, 
If(
    IsBlank(CastingDropDown.Selected.Result),
    Filter('Provider Preference Profile', CountRows(Filter(ForAll(_searches, Result in 'Provider Name' & Specialty & Type1 & Language & Location & Gender), Value)) =
    CountRows(_searches) ),
    Filter('Provider Preference Profile', CountRows(Filter(ForAll(_searches, Result in 'Provider Name' & Specialty & Type1 & Language & Location & Gender), Value)) =
    CountRows(_searches), 'Casting ' in CastingDropDown.Selected.Result, 'Incision & Drainage' in IncisionDrainDropDown.Selected.Result)))
1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @imelendez 

 

Please try this

 

With({_searches: Filter(Split(TextSearchBox1, ";"), !IsBlank(Result))},
    Filter('Provider Preference Profile', CountRows(Filter(ForAll(_searches, Result in 'Provider Name' & Specialty & Type1 & Language & Location & Gender), Value)) =
    CountRows(_searches),
IsBlank(CastingDropDown.Selected.Result) || 'Casting ' in CastingDropDown.Selected.Result, IsBlank(IncisionDrainDropDown.Selected.Result) || 'Incision & Drainage' in IncisionDrainDropDown.Selected.Result)
)
)//If
) //With

 


Thanks,
Stalin - Learn To Illuminate

View solution in original post

1 REPLY 1
StalinPonnusamy
Community Champion
Community Champion

Hi @imelendez 

 

Please try this

 

With({_searches: Filter(Split(TextSearchBox1, ";"), !IsBlank(Result))},
    Filter('Provider Preference Profile', CountRows(Filter(ForAll(_searches, Result in 'Provider Name' & Specialty & Type1 & Language & Location & Gender), Value)) =
    CountRows(_searches),
IsBlank(CastingDropDown.Selected.Result) || 'Casting ' in CastingDropDown.Selected.Result, IsBlank(IncisionDrainDropDown.Selected.Result) || 'Incision & Drainage' in IncisionDrainDropDown.Selected.Result)
)
)//If
) //With

 


Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,303)