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 / Error when created sea...
Power Apps
Answered

Error when created search box and dropdown filter in Gallery

(0) ShareShare
ReportReport
Posted on by 22

Hi all, Could you help me to fix this formula? I have one search box and 2 dropdown filter boxes and its error on these below formula.

 

Filter('AllStock 1609S',
Dropdown1.Selected.'Project Name'=Blank() Or 'Project Name'=Dropdown1.Selected.'Project Name',
Dropdown1_1.Selected.Zone=Blank() Or Zone=Dropdown1_1.Selected.Zone);

 

SortByColumns(Search([@'AllStock 1609S'], TextInputStockDisplay.Text, "cr746_stockid", "cr746_projectname","cr746_btsmrtairportlink","cr746_houseno","cr746_description","cr746_address"),"cr746_id",SortOrder.Descending)

 

Pammie_0-1697809052719.png

 


 
Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,831 Super User 2026 Season 1 on at

    Hi @Pammie ,

     

    You need to nest the filter in your existing formula, rather than adding it as an extra formula:

     

    SortByColumns(
    	Search(
    		Filter(
    			'AllStock 1609S',
    			Dropdown1.Selected.'Project Name'=Blank() Or 'Project Name'=Dropdown1.Selected.'Project Name',
    			Dropdown1_1.Selected.Zone=Blank() Or Zone=Dropdown1_1.Selected.Zone
    		), 
    		TextInputStockDisplay.Text, 
    		"cr746_stockid", "cr746_projectname","cr746_btsmrtairportlink","cr746_houseno","cr746_description","cr746_address"
    	),
    	"cr746_id",
    	SortOrder.Descending
    )
  • Pammie Profile Picture
    22 on at

    Thank you sir, its not error but not showing the item in gallery when i try to either searching or filter one of them. do i miss something?

  • BCBuizer Profile Picture
    22,831 Super User 2026 Season 1 on at

    Hi @Pammie ,

     

    Can you share an example of what is not working? From first looks the formula seems fine.

  • Pammie Profile Picture
    22 on at

    @BCBuizer here. the formula seems fine, no error but its not showing the result of filter

    Pammie_2-1697811841088.png

     

     

     

  • BCBuizer Profile Picture
    22,831 Super User 2026 Season 1 on at

    Hi @Pammie ,

     

    I meant to give an example of a record you would expect to see, together with the values set for DropDown1, DropDown1_1 and TextInputStockDisplay.

  • Pammie Profile Picture
    22 on at

    @BCBuizer i expected to see the lists in gallery when selected either DropDown1 or DropDown1_1 or TextInputStockDisplay, it should be work individually.

     

  • BCBuizer Profile Picture
    22,831 Super User 2026 Season 1 on at

    Hi @Pammie ,

     

    Let's try to eliminate where the issue is. Can you use the below for the Items property of the gallery and see if you are now able to filter using the DropDown controls?

     

    Filter('AllStock 1609S',
    Dropdown1.Selected.'Project Name'=Blank() Or 'Project Name'=Dropdown1.Selected.'Project Name',
    Dropdown1_1.Selected.Zone=Blank() Or Zone=Dropdown1_1.Selected.Zone)
  • Pammie Profile Picture
    22 on at

    @BCBuizer yes, it works perfectly for filtering by dropdown.

  • BCBuizer Profile Picture
    22,831 Super User 2026 Season 1 on at

    Hi @Pammie ,

     

    All right, and when you use just the Search part?

    SortByColumns(Search([@'AllStock 1609S'], TextInputStockDisplay.Text, "cr746_stockid", "cr746_projectname","cr746_btsmrtairportlink","cr746_houseno","cr746_description","cr746_address"),"cr746_id",SortOrder.Descending)

     

  • Pammie Profile Picture
    22 on at

    @BCBuizer just for the search part, it's working well. please suggest...

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard