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 / Allow Text Box Search ...
Power Apps
Answered

Allow Text Box Search on Gallery

(0) ShareShare
ReportReport
Posted on by 658

Hi,

 

I have a booking equipment app setup and this code below is set on the items of the gallery. Could someone please advise on how to get TextSearchBox1 to search for data in a choice column from my SharePoint list? Please see the code below.

 

SortByColumns(
 Filter(
 [@'SPList'],
 Equipment.Value = "Set 1" || Equipment.Value = "Set 2" || Equipment.Value = "Sph" || Equipment.Value = "Chromebooks" || Equipment.Value = "Chrome",
 'End Time' > Now(),
 Booker.Email = User().Email
 ),
 "EndTime",
 If(
 SortDescending1,
 SortOrder.Descending,
 SortOrder.Ascending
 )
)

 

Thanks in advance.

Categories:
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @BS10 

     

    Try this

     

    SortByColumns( Filter( [@'SPList'],
    Equipment.Value = "Set 1" || Equipment.Value = "Set 2" || Equipment.Value = "Sph" ||
    Equipment.Value = "Chromebooks" || Equipment.Value = "Chrome", 'End Time' > Now(), Booker.Email = User().Email,
    TextSearchBox1.Text in Equipment.Value
    ), "EndTime",

    If( SortDescending1, SortOrder.Descending, SortOrder.Ascending )
    )

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation. 

  • madlad Profile Picture
    2,637 Moderator on at

    Hi!

     

    You could add an additional line in the filter, 

     

    TextSearchBox1.Text in *ChoiceColumn*.Value

     

    However, this will not be delegable, and I don't believe there's a way to search exactly like this that is delegable. 

    If you needed it to be delegable, you'd have to search using StartsWith function and AddColumns function, similarly to this post

     

    Hope this helps!

  • BS10 Profile Picture
    658 on at

    Hi @Rajkumar_404,

     

    Thanks for the fast response, this works, thank you! I have a delegation warning though, is there a way to remove that please?

     

    Thanks!

  • madlad Profile Picture
    2,637 Moderator on at

    @BS10 

    If you needed it to be delegable, I think you'll have to search using StartsWith function and AddColumns function, similarly to this post

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @BS10 

     

    @madladhas previously mentioned, please take a look at his earlier response.

     

    Thanks!

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @BS10 

     

    You can try to use the delegation-friendly operators such as '=' or '<>' instead of 'in' to filter the gallery items based on the 'Equipment' choice column. 

     

    Equipment.Value = TextSearchBox1.Text

     Thanks!

  • BS10 Profile Picture
    658 on at

    Hi @Rajkumar_404,

     

    Thanks for the recommendation, when I try with = nothing appears in the gallery and when I search for the items only one appears? I did try <> but this throws up another delegation warning. I will try the post link you mentioned previously, thank you!

  • BS10 Profile Picture
    658 on at

    Thanks both @madlad @Rajkumar_404 - I really appreciate it.

     

    If I was to use the functions StartsWith and AddColumns, where should I place these within the formula of the items property? 

     

    Thanks

  • Verified answer
    SBax Profile Picture
    1,348 on at

    You could use a combination of search and filter

    Search([filtered datasource], [textboxname].text, [column you want to search wrapped in double quotes]) is the syntax for search.

     

    This should be a simpler approach, and is delegable

     

     

  • BS10 Profile Picture
    658 on at

    Hi @SBax,

     

    Thanks for the reply, could you please advise on where to place this search syntax in my code below? Could you please advise on the filter syntax too? 

     

    SortByColumns(
     Filter(
     [@'SPList'],
     Equipment.Value = "Set 1" || Equipment.Value = "Set 2" || Equipment.Value = "Sph" || Equipment.Value = "Chromebooks" || Equipment.Value = "Chrome",
     'End Time' > Now(),
     Booker.Email = User().Email
     ),
     "EndTime",
     If(
     SortDescending1,
     SortOrder.Descending,
     SortOrder.Ascending
     )
    )

     

    Thank you!

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard