I use the standard DropdownSearch element to select an item from a long list. Luckily, with the AdvancedFormat variable I have already tackled some annoying behaviour.

When I toggle the DropdownSearch, it shows all results available which is perfect. But as soon as I start searching by using the text input, the number of shown results is always limited to a maximum of 4 records. This seems to be a default set by the used component ("choices" by jshjohnson).

Is there any trick to get rid of this limit and raise it - without cloning the outsystemsUI component and losing all future updates on the component?

Hi Erik ,

Are you talking about SearchResultsLimit in dropdown input parameter?


Take a look at this doc . 

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Patterns/Using_Web_Patterns/Controls/DropdownSelect


Yes, that's exactly what I need, however this documentation is for DropdownSelect in Traditional Web and I am working with DropdownSearch on Reactive - which doesn't have a SearchResultsLimit input parameter, and it is not part of the FuseJS AdvancedFormat options...



Hello.

Did someone know how to fix this issue? I'm also struggling with this. I've tryied to put in AdvanceFormat the folowing:

"{ ""searchResultLimit"": 2 }"

And this only works when a user searchs for something... Otherwise shows everything....


Thanks

Hi Tiago, unfortunately the SearchResultLimit is not implemented as a customizable parameter.

We solved this issue by cloning the regular Outsystems UI block into a custom block, and add the parameter ourselves.

Unfortunately, this will exclude us from any future changes / tweaks done by OutSystems but in this case the customized functionality is more important for us.

Erik Jan Doornewaard wrote:

Hi Tiago, unfortunately the SearchResultLimit is not implemented as a customizable parameter.

We solved this issue by cloning the regular Outsystems UI block into a custom block, and add the parameter ourselves.

Unfortunately, this will exclude us from any future changes / tweaks done by OutSystems but in this case the customized functionality is more important for us.

 Thanks :)

 

Hi All,


Just to offer an option without cloning anything : it is possible to use SearchResultsLimit in the AdvancedFormat property.  I get that it makes it uglier to use than with a nice named input parameter, but I think that cloning is even less desirable.

So here's a suggestion for another option that makes it easier on your developers, without having to clone.  Make a client action that takes in all the options that you feel are missing, make sure it is a function and all inputs are optional, use this function as AdvancedFormat value for the dropdownsearch widget.

See attached oml, bottom part of the Demo Screen.

What I like about doing it like this, is that right there in the properties of the widget, you can clearly see what options are available (as optional inputs get named when using a function) and you see what values are used.


Dorine

@Tiago, there's too much """" in your example, that's probably why it didn't work.  And I would say of course otherwise it shows everything, right ?

@Dorine,

We have tried that but with my Javascript knowledge I didn't find any way the advanced format would overrule the search limit which is in the used script calling the choices.js the limit is hardcoded fixed to 4. At least me and my colleagues couldn't get it working - but would love to see your working example to prove we were doing something wrong...

Yes,

just try it, it's working

@Dorine

Please note that this thread was started in Februari and at that moment it certainly was impossible to achieve a different number of results than 4, by using the AdvancedFormat parameter.

Apparently it is working now as we would expected it to work. There must have been some OutsystemsUI update which was not documented in the Change Log in the forge. Thanks for pointing this out, and we will probably consider moving back to the standard element instead of using our cloned version.

Dorine Boudry wrote:

@Tiago, there's too much """" in your example, that's probably why it didn't work.  And I would say of course otherwise it shows everything, right ?

I got it working but only with the exact number of " as Tiago used, so it seems there are not too many in his example.

@Tiago, which version of Outsystems UI do you use?

Yes,

absolutely agree, OutsystemsUI is constantly changing, so this is a probably fixed in the meantime.  My demo dates from end of june, so it was fixed before that.

About the quotes, don't know what to say, it works without any around the names of options, can't get it working when i start adding them.  But hey, there it is, whatever works for you.

Dorine