cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Community Support Team
Community Support Team

Re: Search Box while Filtering SharePoint List on two Drop Downs

Hi @llacefield ,

Have you taken a try with the solution I provided above?

 

Based on the needs that you mentioned, I think the solution I provided above could achieve your needs. Please consider set the Items property of the Gallery to following:

Filter(
         Search(tblEquipment, TextSearchBox1.Text, "SearchColumn1", "SearchColumn2", "SearchColumn3", ...),
If(
IsBlank(dpr_Category.SelectedText.Value), true,
IsBlank(dpr_Group.SelectedText.Value), Category = drp_Category.SelectedText.Value,
Category = drp_Category.SelectedText.Value && Group = drp_Group.SelectedText.Value
) )

 

Based on the error screenshot that you provided, I think there is something wrong with the If() function you specified. Please consider take a try with above formula I provided to fix your issue.

 

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.
Highlighted
llacefield
Level: Powered On

Re: Search Box while Filtering SharePoint List on two Drop Downs

@v-xida-msft 
I have, this code only utilizes the search box when a drp_Category and drp_Group have been utilized first. I'd like it to be that when the user gets to the app they can then utilize the search box without filtering with the drp_Category and drp_Group drop downs. 

Community Support Team
Community Support Team

Re: Search Box while Filtering SharePoint List on two Drop Downs

Hi @llacefield ,

Based on the your statement, I think you have something understanding on the formula I provided above.

 

The Search() function within the formula I provided above would be executed firstly, rather than executed after the drp_Category and drp_Group filter. The  drp_Category and drp_Group filter condition would be executed based on the result the Search() function returned.

 

Please consider set the Items property of the Gallery to following formula:

Filter(  /* <-- Outer Filter function would be executed after the Search function */
         Search(tblEquipment, TextSearchBox1.Text, "SearchColumn1", "SearchColumn2", "SearchColumn3", ...),  /* <-- This formula would be executed firstly, regardless of whether or not you use the drp_Category and drp_Group filter */
If(
IsBlank(dpr_Category.SelectedText.Value), true,
IsBlank(dpr_Group.SelectedText.Value), Category = drp_Category.SelectedText.Value,
Category = drp_Category.SelectedText.Value && Group = drp_Group.SelectedText.Value
) )

When you type above formula within your Gallery, your Gallery may not show immediately show any data (it is an known issue). In order to fix this issue, please type at least one character in the search box, and then delete the text that you typed. The gallery will then show data as expected.

 

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

Re: Search Box while Filtering SharePoint List on two Drop Downs

Hi @v-xida-msft 

I greatly appreciate the assistance in this issue but with the code you provided it did not work. 

I tried typing a single character, deleting it, and trying again but no success in the search of tools. When I placed the code in the Gallery "Items" property, I saved, closed the app, and reopened it and tried it again with no success.

Community Support Team
Community Support Team

Re: Search Box while Filtering SharePoint List on two Drop Downs

Hi @llacefield ,

Could you please share a bit more about your formula?

 

Please consider type the following formula within the Items property of your Gallery:

Search(tblEquipment, TextSearchBox1.Text, "SearchColumn1", "SearchColumn2", "SearchColumn3", ...)

then type some text within the Text Search box, check if the Search functionality works well.

 

If above formula could not work in your app, please take a try with the following formula to achieve your Search functionality:

Filter(tblEquipment, TextSearchBox1.Text in Column1 || TextSearchBox1.Text in Column2 || ...)

 

Modify your formula within the Items property of the Gallerty to following:

Filter(
         Filter(tblEquipment, TextSearchBox1.Text in Column1 || TextSearchBox1.Text in Column2 || ...),
If(
IsBlank(dpr_Category.SelectedText.Value), true,
IsBlank(dpr_Group.SelectedText.Value), Category = drp_Category.SelectedText.Value,
Category = drp_Category.SelectedText.Value && Group = drp_Group.SelectedText.Value
) )

 

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

 

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.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 110 members 3,535 guests
Please welcome our newest community members: