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

Search box and 2 dropdown filter

Dear Community Smiley Very Happy,

I would like to Seach on the SearchBox and the some dataname will show up.

After that I will select the Catagory and Location from dropdown, so some datas will be filter more.

 

Filter(
MergedCollection, "Equip_x0020_Code" exactin TextSearchBox2.Text,
If(
IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
true,
Located = Where.Selected.Result
),
If(
IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
true,
Category = What.Selected.Result
)
)

But I stuck with some coding (as always),

 

 

Screen Shot 2562-07-08 at 22.04.16.png

 

Best regards

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Premwong13
Level: Powered On

Re: Search box and 2 dropdown filter

Dear @timl ,

I can solve it Smiley Happy Thank you so much for your help

Regards

5 REPLIES 5
Super User
Super User

Re: Search box and 2 dropdown filter

Hi @Premwong13 

If you change your syntax so that it looks like this, I think it'll help.

 

Filter(
MergedCollection, "Equip_x0020_Code" exactin TextSearchBox2.Text,
Located = If(
IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
true,
Where.Selected.Result
),
Category = If(
IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
true,
What.Selected.Result
)
)

Otherwise, could you click on the red exclamation icon and tell us the error message that appears?

 

Premwong13
Level: Powered On

Re: Search box and 2 dropdown filter

Dear @timl,

I used your according formula, it said the tyoe if valiable is not the same.

 

Screen Shot 2562-07-09 at 06.07.13.pngScreen Shot 2562-07-09 at 06.08.04.png

 

Best regards, 

Premwong13
Level: Powered On

Re: Search box and 2 dropdown filter

Dear @timl,

However I tried this code with a new random gallery,

Filter(
MergedCollection, "Equip_x0020_Code" exactin TextSearchBox2.Text)

There is no reslut, like not thig appeaer on Gallery tho.

Best regards, 

Highlighted
Premwong13
Level: Powered On

Re: Search box and 2 dropdown filter

Dear @timl ,

I can solve it Smiley Happy Thank you so much for your help

Regards

Community Support Team
Community Support Team

Re: Search box and 2 dropdown filter

Hi @Premwong13 ,

Have you solved your problem?

 

Based on the formula that you provided, I think there is something wrong with it. You should type TextSearchBox2.Text in "Equip_x0020_Code" within your Filter formula rather than  "Equip_x0020_Code" in TextSearchBox2.Text.

I have made a test on my side, please consider modify your formula as below:

Filter(
      MergedCollection, TextSearchBox2.Text in "Equip_x0020_Code",    /* <-- use 'in' operator or 'exactin' */
      If(
          IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
          true,
          Located = Where.Selected.Result
      ),
      If(
         IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
         true,
         Category = What.Selected.Result
      )
)

Or

Filter(
      Search(MergedCollection, TextSearchBox2.Text, "Equip_x0020_Code"),   /* <-- use Search function to filter results based on the TextSearchBox */
      If(
          IsBlank(Where.Selected.Result) || Where.Selected.Result = "Select All",
          true,
          Located = Where.Selected.Result
      ),
      If(
         IsBlank(What.Selected.Result) || What.Selected.Result = "Select All",
         true,
         Category = What.Selected.Result
      )
)

Note: I assume that the 'Equip_x0020_Code' is a Text type column in your MergedCollection.

 

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

 

If you have solved your problem, and the solution I provided above is helpful in your scenario, please consider go ahead to click "Accept as Solution" to identify this thread has been 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

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 277 members 5,274 guests
Please welcome our newest community members: