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 / Search from text box w...
Power Apps
Answered

Search from text box without and icon

(0) ShareShare
ReportReport
Posted on by 109

I have been trying to get a search to work from a text box without forcing a user to press the icon to dynamically update a data grid. My attempts were using the OnChange property on the text box but that wasn't successful.

 

Any suggestions or isn't this possible?

 

Ideally, when a user enters a "B" the grid will filter to names containing a "B".  Once they enter "Bo" they will see names that contain "Bo".  This would allow them to enter the fewest characters possible to filter the records.

Categories:
  • K-A-R-L Profile Picture
    715 on at

    Hi @MarcRohde ,

    Are you using an O365 Connector or just a SP list?

     

    Just leave the OnSelect() and OnChange() of the Text Box to false.

    If Yes, set the Item() Property of the Gallery to:

     

    If(IsBlank(TextInput1.Text), Office365Users.SearchUser({searchTerm:""}),If(Not(IsBlank(Trim(TextInput1.Text))),Office365Users.SearchUser({searchTerm:Trim(TextInput1.Text)})))

     

    If it's a raw List:

    If(!IsBlank(TextInput1.Text),Search(DataSource, TextInput1.Text, "ColumnName1", "ColumnName2"))

    This searches the data source for records in which either the ColumName1 or the ColumName2 contains the search string (TextInput1.Text) anywhere within it.


    Both works in Gallery and Data Table.

     

    Best of luck.

    Thanks,
    K-A-R-L


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    If you thought this post was helpful, please give it a Thumbs Up.

     

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

    Hi @MarcRohde ,

    Do you want to filter your data table records based on a TextSearchBox?

     

    Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:4.JPG

    Set the Items property of the Data Table to following formula:

    Search('20190325_case13', TextSearchBox1.Text, "ProjectName")

    On your side, you should type:

    Search('YourDataSource', TextSearchBox1.Text, "FilteredColumn")

    Or

    Filter('YourDataSource', TextSearchBox1.Text in FilteredColumn)

    Note: If you type above formula within your Data Table's Items property, but there is no data displayed, please consider type a text within the TextSearchbox, then remove it, after that, the issue would be fixed.

    Please check the following GIF screenshot for more details:Test.gif

     

     

    In addition, I also think the Timer control could also achieve your needs. You could consider add a Timer control within your app, set the Duration property to following:

    1000

    set the AutoStart property and Repeat property to following:

    true

    set the OnTimerEnd property to following:

    ClearCollect(RecordsCollection, Filter('YourDataSource', TextSearchBox1.Text in FilteredColumn))

    set the Visible proeprty of the Timer control to following:

    false

     

    Set the OnStart property of the App control to following:

    ClearCollect(RecordsCollection, 'YourDataSource')

     

    Set the Items property of your Data Table to following:

    RecordsCollection

    then run your app, check if the issue is solved.

     

    Above formulas may cause a Delegation warning issue, if the amount of your data source records is not more than 2000, you could ignore this issue. You could set the "Data row limit for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings, so you could process 2000 records locally at most in your app.

    If the amount of your data source records is more than 2000, please check and see if the alternative solution within the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/General-Discussion/Pulling-in-large-ish-SQL-tables/m-p/243777#M71518

     

     

    Best regards,

  • MarcRohde Profile Picture
    109 on at

    These both gave great direction! I was able to get it to work exactly how I needed it.  Thanks for the replies.

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

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard