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

Search box and 2 dropdown filter

Dear Community :D,

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
Premwong13 Helper I
Helper I

Re: Search box and 2 dropdown filter

Dear @timl ,

I can solve it 🙂 Thank you so much for your help

Regards

View solution in original post

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?

 

Highlighted
Premwong13 Helper I
Helper I

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 Helper I
Helper I

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, 

Premwong13 Helper I
Helper I

Re: Search box and 2 dropdown filter

Dear @timl ,

I can solve it 🙂 Thank you so much for your help

Regards

View solution in original post

Community Support
Community Support

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
secondImage

Community User Group Member Badges

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

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (8,520)