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

Combox box search

Hi,

 

Is there any way to change the way fields are searched in a combo box. I have a combo box with a list of values in decimal places. Whenever I type an integer, it returns me all those values which "contain" that integer. 

However, I want to show only the values which "start with" that integer. 

 

For example: If i type 20, I should only see values like 20.01, 20.225, 20.228 etc and NOT 1.203, 320.2 etc...

 

Is there any way to do this?

 

Thanks,

Ashep

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Combox box search

Hi @AShep ,

Could you please share a bit more about your data source?

Which colum does your ComboBox connect to? A Choice type column in your SP list data source?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. I create a SP list, then add a Choice column within it with available values -- 1.203, 320.2, 20.01, 20.225, 20.228, ...

Then I generate an app based on my created SP List data source. Within the Edit form of the app, the Search functionality within the ComboBox works well as below:Test.gif

 

If you use a seperated ComboBox control within your app, I have made a test on my side, I think the StartsWith function and Filter function could achieve your needs.

Please take a try with the following workaround:6.JPG

Set the OnStart property of the App control to following:

ClearCollect(
AvailableValues,
{Id:1, Value: "1.203"}, {Id: 2, Value: "320.2"}, {Id: 3, Value:"20.01"}, {Id:4, Value: "20.225"}, {Id:5, Value:"20.228"}, {Id:6, Value:"15.14"}, {Id:7, Value:"15.23"}, {Id:8, Value:"15.21"}, {Id:9, Value:"16.15"} )

Set the Items property of the ComboBox (ComboBox2) to following formula:

Filter(AvailableValues, StartsWith(Value, ComboBox2.SearchText))

Set the IsSearchable property of the ComboBox to following:

true

Set the DisplayFields and SearchFields property of the ComboBox to following:

["Value"]

Please check the following GIF screenshot as below:Test.gif

Please take a try with above solution, then re-load your your app (fire the OnStart property of the App control), check if the issue is solved.

 

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
Dual Super User
Dual Super User

Re: Combox box search

Hi @AShep 

 

Can you please try to use this expression in the "SearchFields" property of your combobox:
 
[StartsWith("Value","Value")]
Here, Value refers to the name of my column, please replace this with your actual attribute name.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
AShep
Level: Powered On

Re: Combox box search

Hi there @yashag2255,

 

This doesn't seem to work. It is again showing me all the entries which have that value in it and not the ones with StartWith.

 

Thanks,

AShep

Community Support Team
Community Support Team

Re: Combox box search

Hi @AShep ,

Could you please share a bit more about your data source?

Which colum does your ComboBox connect to? A Choice type column in your SP list data source?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. I create a SP list, then add a Choice column within it with available values -- 1.203, 320.2, 20.01, 20.225, 20.228, ...

Then I generate an app based on my created SP List data source. Within the Edit form of the app, the Search functionality within the ComboBox works well as below:Test.gif

 

If you use a seperated ComboBox control within your app, I have made a test on my side, I think the StartsWith function and Filter function could achieve your needs.

Please take a try with the following workaround:6.JPG

Set the OnStart property of the App control to following:

ClearCollect(
AvailableValues,
{Id:1, Value: "1.203"}, {Id: 2, Value: "320.2"}, {Id: 3, Value:"20.01"}, {Id:4, Value: "20.225"}, {Id:5, Value:"20.228"}, {Id:6, Value:"15.14"}, {Id:7, Value:"15.23"}, {Id:8, Value:"15.21"}, {Id:9, Value:"16.15"} )

Set the Items property of the ComboBox (ComboBox2) to following formula:

Filter(AvailableValues, StartsWith(Value, ComboBox2.SearchText))

Set the IsSearchable property of the ComboBox to following:

true

Set the DisplayFields and SearchFields property of the ComboBox to following:

["Value"]

Please check the following GIF screenshot as below:Test.gif

Please take a try with above solution, then re-load your your app (fire the OnStart property of the App control), check if the issue is solved.

 

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

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,189)