web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Filter and search

(0) ShareShare
ReportReport
Posted on by 347

hi,

I have 2 gallerys setup with the following for items in Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID)

 

How can add a filter drop down box and a search box if I want to keep the above?

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    You need to have an "If" condition that will check if dropdown and search box have data

     

     

    So, something like this:

     

    If(IsBlank(TextInput1.Text) && IsBlank(DropDown.Selected.Value),

       Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID),

       If(!IsBlank(TextInput1.Text) && IsBlank(DropDown.Selected.Value),

          Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID, Text = TextInput1.Text),

          If(IsBlank(TextInput1.Text) && !IsBlank(DropDown.Selected.Value),

             Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID, Value = DropDown.Selected.Value),

             Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID, Value = DropDown.Selected.Value, Text = TextInput1.Text)

           )

        )

    )

     

    Just change the fields names and the Dropdown and search input name

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    My website!

    My blog!

          

  • KT61 Profile Picture
    347 on at

    Thanks @Nogueira1306 

    I have tried this in items for the table1 gallery and changed the names, but its not working.

     

    What do I put in the dropdown and the text search? thanks

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    You need to insert the dropd down and the text input. After that you check the name and replace in the code I gave you..

    You also need to be careful with fields that the dropwdown gives.. It may not be the ".Value"

  • KT61 Profile Picture
    347 on at

    Thanks, I think i have the names sorted...I think.

    But have a problem with the following:

     

    KT61_0-1694689265781.png

    "Name isn't valid 'Text' isn't recognized"

     

  • gcmfaizan Profile Picture
    1,022 on at

    @KT61 I think you are trying to use Text function, here is the correct syntax of Text function:

    Text(TextInput4.Text)

    If you want to compare TextInput4 with any other like column then use it as:

    YourColumnName = Text(TextInput4.Text)

     

    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

     

    Thanks!

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Replace that "Text" for the collumn name that you want to search on...

  • KT61 Profile Picture
    347 on at

    Ok, I have the following:

     

    If(IsBlank(TextInput4.Text) && IsBlank(ComboBox2.Selected.ProductCategory),

    Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID),

    If(!IsBlank(TextInput4.Text) && IsBlank(ComboBox2.Selected.ProductCategory),

    Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID, ProductName = TextInput4.Text),

    If(IsBlank(TextInput4.Text) && !IsBlank(ComboBox2.Selected.ProductCategory),

    Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID, ProductCategory = ComboBox2.Selected.ProductCategory),

    Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID, ProductCategory = ComboBox2.Selected.ProductCategory, ProductName = TextInput4.Text)

    )

    )

    )

     

    My Combo box has the product list, but when I select anything the whole gallery disappears. 

     

    And also my search box in textinput4 does not work. 

     

     

     

  • KT61 Profile Picture
    347 on at

    Hi Folks, 

    Still struggling with this one.

    I have started again.

     

    This works for the textbox search by itself

    Search(Table1,TextInput4.Text,"ProductName")

     

    This works for the dropdown by itself

    Filter(Table1,ProductName = ComboBox2.Selected.ProductName)

     

    and this works for the category gallery by itself 

    Filter(Table1,ProductCategory = 'Catergory'.Selected.ProductCategoryID)

     

    I can't get the 3 of them to work using the above help.

    Any more suggestion please?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard