1697
Views
18
Comments
Solved
DropdownSelect Search Configuration
Question

Hi all,

Is it possible to configure dropdown select (https://outsystemsui.outsystems.com/OutSystemsUILiveStyleGuide/DropdownSelect.aspx) to return only results which contains my search query?

For example, searching for ann would returns me Ann and Hannah


2020-06-02 12-03-59
Martin den Braven
Solution

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

"{
fuseOptions: {
          threshold: 0.2,
          matchAllTokens: true,
          tokenize: true        
     }
}"
2021-07-14 09-27-33
Luís Cardoso

Martin Den Braven wrote:

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

"{
fuseOptions: {
          threshold: 0.2,
          matchAllTokens: true,
          tokenize: true        
     }
}"

Thanks Martin!


I tested and works fine ;)



TestDropDown.oml
2020-06-02 12-03-59
Martin den Braven

Luís Cardoso wrote:

Martin Den Braven wrote:

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

"{
fuseOptions: {
          threshold: 0.2,
          matchAllTokens: true,
          tokenize: true        
     }
}"

Thanks Martin!


I tested and works fine ;)



Your welcome :)



2018-10-16 14-39-27
Vera Mendonça

Martin Den Braven wrote:

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

"{
fuseOptions: {
          threshold: 0.2,
          matchAllTokens: true,
          tokenize: true        
     }
}"

Thank you Martin, it worked!

UserImage.jpg
Erick Tito Fernandez

Thank you Martin, it worked!

2018-09-27 18-20-33
Swatantra Kumar
Champion

Maybe I didn't get your question, but this is what DropDown is doing. What specific the question is?

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Swatantra, 

What Yi Hao, is saying is that it should not show any option that has not the exact sequence of entered characters, so when ann is entered only names that have these excact character sequence should be shown.

The select2 does some kind of 'smart' filtering, where the best matches are at the top, and matches that are not a 100% match have a lower position in the list.

Regards,

Daniel

2018-09-27 18-20-33
Swatantra Kumar
Champion

Got it (question), thanks.

2018-10-16 14-39-27
Vera Mendonça

Hi,

Does anyone have the solution for this?

2025-11-19 06-14-01
Miguel Verdasca
Champion
2018-10-16 14-39-27
Vera Mendonça

Nuno Miguel Verdasca wrote:

Vera, do you want something like this: https://www.outsystems.com/forge/component-overview/982/select2 ?

I think it's now called DropdDown Select actually... but the thing is to return ONLY the results that match EXACTLY the input text


2025-11-19 06-14-01
Miguel Verdasca
Champion

I believe that in search query in this component you have something like this: 

Select .... From ... Where .... LIKE "%SearchString%"


And with this two % the query will be searching for all content with this chars (with this piece of string). If you want a perfect match, you need extend the component and remove the %, and if you want search for all strings that starts by the SearchString, you need remove the first %.

I don't know if this helps you? Let me know

2018-10-16 14-39-27
Vera Mendonça

Nuno Miguel Verdasca wrote:

I believe that in search query in this component you have something like this: 

Select .... From ... Where .... LIKE "%SearchString%"


And with this two % the query will be searching for all content with this chars (with this piece of string). If you want a perfect match, you need extend the component and remove the %, and if you want search for all strings that starts by the SearchString, you need remove the first %.

I don't know if this helps you? Let me know


That I understand and was avoiding going that way. The component doesn't have queries, everything's in JS. I will keep looking, thanks anyway

2021-07-14 09-27-33
Luís Cardoso

Hello,

In DropdownSelect properties you can define some Advanced formate here:

Please see on odcumentation if this can help you: https://github.com/jshjohnson/Choices#searchenabled


Hope it helps!


BR,

Luis

2018-10-16 14-39-27
Vera Mendonça

Luís Cardoso wrote:

Hello,

In DropdownSelect properties you can define some Advanced formate here:

Please see on odcumentation if this can help you: https://github.com/jshjohnson/Choices#searchenabled


Hope it helps!


BR,

Luis

Hi Luis, 

I've already been looking at this but coudn't figure out what field to use or how to use it...

Thank you 


2021-07-14 09-27-33
Luís Cardoso

Vera Mendonça wrote:

Luís Cardoso wrote:

Hello,

In DropdownSelect properties you can define some Advanced formate here:

Please see on odcumentation if this can help you: https://github.com/jshjohnson/Choices#searchenabled


Hope it helps!


BR,

Luis

Hi Luis, 

I've already been looking at this but coudn't figure out what field to use or how to use it...

Thank you 


I will try to help you with this approach. Do you want to return ONLY the results that match EXACTLY the input text, right?


2018-10-16 14-39-27
Vera Mendonça

Luís Cardoso wrote:

Vera Mendonça wrote:

Luís Cardoso wrote:

Hello,

In DropdownSelect properties you can define some Advanced formate here:

Please see on odcumentation if this can help you: https://github.com/jshjohnson/Choices#searchenabled


Hope it helps!


BR,

Luis

Hi Luis, 

I've already been looking at this but coudn't figure out what field to use or how to use it...

Thank you 


I will try to help you with this approach. Do you want to return ONLY the results that match EXACTLY the input text, right?


Thank you! Yes, correct. Well, it can contain more letters than the input, but need to discard all options that doesn't contain the specific pattern. 

Like, if I insert 'ABC' on the input search field, all given options must contain the exact same pattern 'ABC' (on this order) somewhere on it's text value.

2020-06-02 12-03-59
Martin den Braven
Solution

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

"{
fuseOptions: {
          threshold: 0.2,
          matchAllTokens: true,
          tokenize: true        
     }
}"
2021-07-14 09-27-33
Luís Cardoso

Martin Den Braven wrote:

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

"{
fuseOptions: {
          threshold: 0.2,
          matchAllTokens: true,
          tokenize: true        
     }
}"

Thanks Martin!


I tested and works fine ;)



TestDropDown.oml
2020-06-02 12-03-59
Martin den Braven

Luís Cardoso wrote:

Martin Den Braven wrote:

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

"{
fuseOptions: {
          threshold: 0.2,
          matchAllTokens: true,
          tokenize: true        
     }
}"

Thanks Martin!


I tested and works fine ;)



Your welcome :)



2018-10-16 14-39-27
Vera Mendonça

Martin Den Braven wrote:

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

"{
fuseOptions: {
          threshold: 0.2,
          matchAllTokens: true,
          tokenize: true        
     }
}"

Thank you Martin, it worked!

UserImage.jpg
Erick Tito Fernandez

Thank you Martin, it worked!

2022-11-02 07-18-33
Nicholas Campbell

Hi all, I have found that when I use this, it make the search less strict - i.e. it starts finding choices that don't 100% match the search text...

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.