DropdownSelect Search Configuration

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


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

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

Got it (question), thanks.

Hi,

Does anyone have the solution for this?

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


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

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

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

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 


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?


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.

Hi Vera,

I faced the same issue ;)

You can use this in the advancedFormat

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

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 ;)



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 :)



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!