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 / Text search box doesnt...
Power Apps
Answered

Text search box doesnt work on filter if dropbox is on a particular value

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have an app with the following code, however if the dropdown is on "ALL" the text searchbox doesn't filter the gallery. Yet it works if the dropdown is on the other options?

 

Could someone help me modify the following code, i cant work it out

 

 

SortByColumns(
 If(StatusDropdown.Selected.Value = "ALL", 
 'JSA',
 
 Filter(
 'JSA',
 Status = StatusDropdown.Selected.Value,
 StartsWith(
 JSAID,
 TextSearchBox1_1.Text
 )
 )
 ),
 "Created",
 If(
 SortDescending1,
 Descending,
 Ascending
 )
)

 

 

Categories:
  • eka24 Profile Picture
    20,925 on at

    Try

    SortByColumns(
    If(StatusDropdown.Selected.Value <>"ALL",
    Filter( JSA,Status = StatusDropdown.Selected.Value && StartsWith( JSAID, TextSearchBox1_1.Text )),
    Filter( JSA, StartsWith( JSAID, TextSearchBox1_1.Text ))),
    "Created", If( SortDescending1, Descending, Ascending ) )

    ------------
    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    That is because you didn't apply the filter function to table when dropdown is 'All'. Please modify the code as follows:

    SortByColumns(
     If(StatusDropdown.Selected.Value = "ALL", 
     Filter(
     'JSA',
     StartsWith(
     JSAID,
     TextSearchBox1_1.Text
     )
     ),
     Filter(
     'JSA',
     Status = StatusDropdown.Selected.Value,
     StartsWith(
     JSAID,
     TextSearchBox1_1.Text
     )
     )
     ),
     "Created",
     If(
     SortDescending1,
     Descending,
     Ascending
     )
    )

    Hope this helps.

    Sik

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard