cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarcRohde
Level: Powered On

Search from text box without and icon

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Search from text box without and icon

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#M7...

 

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
K-A-R-L
Level 10

Re: Search from text box without and icon

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.

 

Community Support Team
Community Support Team

Re: Search from text box without and icon

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#M7...

 

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

MarcRohde
Level: Powered On

Re: Search from text box without and icon

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,707)