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 Platform Community / Forums / Power Apps / Having trouble filter ...
Power Apps
Answered

Having trouble filter gallery by drop down and text input

(0) ShareShare
ReportReport
Posted on by 58

Need some help.

 

Here's is my code for my gallery.

I'd like to filter the gallery based off the drop down but also filter the gallery based off of the text input and for some reason the text input won't filter the gallery anymore.

Screenshot (19).png

Categories:
  • AnthonyPSlalom Profile Picture
    77 on at

    Hi jNelly.  It looks like you're not applying the drop down filter to the original filtered list.  You're applying it to the base table.  To do what you're doing you'd want to apply the filter to the previously filtered list.

     

    Here's what you're doing.

     

    Filter(InventoryList, available < 3 && available > 0), Filter(InventoryList, StartsWith(Title, Textinput1.text)

     

    What you want to do is Filter(Filter(InventoryList, StartsWith(Title, Textinput1.text), available < 3 && available > 0)

     

    but a better way would be to maybe use the Search function around the filter.

     

    Search(Filter(InventoryList, available < 3 && available > 0), TextInput1.Text, "column1"))

  • jNelly Profile Picture
    58 on at

    Yes that is what I'm trying to do but I'm not sure what to do with the drop down and my if statement

  • AnthonyPSlalom Profile Picture
    77 on at

    Ok let me see if I can help... This is what I would do

    Filter(

    If(Dropdown2.Selected.Value = "Low Stock", Filter('Inventory List', 'Available(n)' < 3 && 'Available(n)' > 0 ,'Inventory List',),StartsWith(Title, TextInput1.Text) || StartsWith('Accessory Category', TextInput1.Text) || StartsWith(Manufacturer, TextInput1.Text))

     

    This does exactly what you were doing just in the correct order.

  • AnthonyPSlalom Profile Picture
    77 on at

    Just another recommendation that would make this easier.  You might consider adding a text column in your data set that is a calculated column.  basically have a text column that says "Low Stock" if Available(n) is between 1-3 or "No Stock" if Available(n) = 0 or "Stocked" if Available(n) > 3 then you could just filter by that column using your dropdown.

  • Verified answer
    jNelly Profile Picture
    58 on at

    This is what I ended up doing and it works. Thank you for the help!

     

     

    If(
    Dropdown2.Selected.Value = "All Items",
    Filter(
    'Inventory List',
    StartsWith(
    Title,
    TextInput1.Text
    ) || StartsWith(
    'Accessory Category',
    TextInput1.Text
    ) || StartsWith(
    Manufacturer,
    TextInput1.Text
    )
    ),
    Dropdown2.Selected.Value = "Out Of Stock",
    Filter(
    'Inventory List',
    'Available(n)' = 0,
    StartsWith(
    Title,
    TextInput1.Text
    ) || StartsWith(
    'Accessory Category',
    TextInput1.Text
    ) || StartsWith(
    Manufacturer,
    TextInput1.Text
    )
    ),
    Dropdown2.Selected.Value = "Low Stock",
    Filter(
    'Inventory List',
    'Available(n)' < 3 && 'Available(n)' > 0,
    StartsWith(
    Title,
    TextInput1.Text
    ) || StartsWith(
    'Accessory Category',
    TextInput1.Text
    ) || StartsWith(
    Manufacturer,
    TextInput1.Text
    )
    )
    )

  • AnthonyPSlalom Profile Picture
    77 on at

    Yup that would work too.  Glad I could help.  Cheers!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard