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

Combobox Search - Single Letter Words

I've created a ComboBox, which has a drop down and search functionality. The list I've used for the selections is to large for everything to fit in the drop down which is fine since the search can find everything. The list is technologies, this works fine with terms like ".Net". The issue comes with single letter technologies, like R. When you put R into the search box, every technology with r in the word comes up, and the list is so long that the language R never actually shows up in the drop down.

 

Any suggestions on how to put that kind of search in? Or ways to get around this issue with the limitations to data? Unfortunatly this is a list I cant shorten.

 

Image 3.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Combobox Search - Single Letter Words

Hi @TesDA ,

Actually, the search functionality within ComboBox is not case-sensitive. So when you type one character within the Searchbox, the ComboBox would list all items which contains that character.

 

As an alternative solution, I agree with @wyotim 's thought almost. You could consider custom the Search functionality of the ComboBox control.

I have made a test on my side, please take a try with the following workaround:12.JPG

12.JPG

Set the Items property of the ComboBox to following formula:

Filter('20190325_case13', StartsWith(Title, ComboBox1.SearchText))

On your side, you should type:

Filter('YourDataSource', StartsWith(DisplayColumn, ComboBox1.SearchText))

Note: The DisplayColumn represents the column you want to display as Primary text within the ComboBox.

set the Primary text property of the ComboBox to your Displaycolumn as above screenshot.

Or

Filter('YourDataSource', ComboBox1.SearchText in DisplayColumn)

 

Above two formulas may cause a Delegation warning issue, it means that you could not delegate the data process to your data source, you could only process data locally. In default, you could only process 500 records locally at most, you could change the limit to maximum value -- 2000.

More details about changing the limits, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview#changing-the-limit

 

 

If the amount of records you populated within the ComboBox is not more than 2000, you could ignore this warning issue. If the amount of records you populated within the ComboBox is more than 2000, please check the following the solution mentioned within the following thread (save your data source records into multiple collections in bulk, then merge the multiple collection into single one collection, then use the merged collection as data source within your ComboBox):

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.
2 REPLIES 2
Super User
Super User

Re: Combobox Search - Single Letter Words

The issue you are coming against is that Search looks for that string anywhere in the values being searched. I would suggest putting a radio button to select between a "contains"-type search and a "starts with"-type search. There are some examples here near the bottom of the page but here are the relevant examples:

// A "contains"-type search
Search( 
    Customers, 
    SearchInput.Text, 
    "Name" 
)

// A "starts with"-type search
Filter( 
    Customers, 
    StartsWith( 
        Name, 
        SearchInput.Text 
    ) 
)

This would require each of these statements to be in an If statement on the gallery Items property, with the radio control determining which one gets used.

 

Hope that helps but let me know if I can help out more. And props to R! Sadly I haven't used that since university. Smiley Sad

Highlighted
Community Support Team
Community Support Team

Re: Combobox Search - Single Letter Words

Hi @TesDA ,

Actually, the search functionality within ComboBox is not case-sensitive. So when you type one character within the Searchbox, the ComboBox would list all items which contains that character.

 

As an alternative solution, I agree with @wyotim 's thought almost. You could consider custom the Search functionality of the ComboBox control.

I have made a test on my side, please take a try with the following workaround:12.JPG

12.JPG

Set the Items property of the ComboBox to following formula:

Filter('20190325_case13', StartsWith(Title, ComboBox1.SearchText))

On your side, you should type:

Filter('YourDataSource', StartsWith(DisplayColumn, ComboBox1.SearchText))

Note: The DisplayColumn represents the column you want to display as Primary text within the ComboBox.

set the Primary text property of the ComboBox to your Displaycolumn as above screenshot.

Or

Filter('YourDataSource', ComboBox1.SearchText in DisplayColumn)

 

Above two formulas may cause a Delegation warning issue, it means that you could not delegate the data process to your data source, you could only process data locally. In default, you could only process 500 records locally at most, you could change the limit to maximum value -- 2000.

More details about changing the limits, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview#changing-the-limit

 

 

If the amount of records you populated within the ComboBox is not more than 2000, you could ignore this warning issue. If the amount of records you populated within the ComboBox is more than 2000, please check the following the solution mentioned within the following thread (save your data source records into multiple collections in bulk, then merge the multiple collection into single one collection, then use the merged collection as data source within your ComboBox):

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.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 158 members 4,172 guests
Please welcome our newest community members: