Auto-complete list issue.

Auto-complete list issue.


I am using 'AutoComplete' widget, which shows a list of names. But,sometimes I do not wait for the list to be loaded, instead I quickly type a valid name. But, it shows 'invalid name'.

Any hints ?

Thanks !
Hi Nikhil Shravage,

Can you give me an example of that? Maybe an eSpace with the component and your query and the logic you are using.
One hint is the loading order of the triggered events (or maybe you are doing an AJAX refresh to it, clearing the new value..just a guess), giving no time to he component to rebind the new value according to the datasource that binds the auto-complete list.
Did you debug this to see the variable value during it?

Best Regards,
Gonçalo Martins
Hi Gonçalo Martins,

Thanks for your quick concern.

Let me clarify my question, I have an auto-complete list where if I click into the textfield the list shows up. But, sometimes I do not click the textfield and I start typing the name as it would be in the list i.e a valid name. And then before the list shows up and prompts me for the name from the list, I press save button where I get 'invalid name' error.

Is it more clear now ?
Hi Nikhil,

As I see, your problem occurs when you try to submit your information and the focus of the inserted name isn't binded in your input.
That might be caused because you don't give time to the element assume the value, because, if I remember, you have to click in the right name to assign it to the input box and then bind the value to the variable.
I tried to simulate your problem but I had no problem. If you want you can send me the eSpace where the problem is happening and I can try to figure it out.

Best Regards,
Gonçalo Martins
From what I understood, the Chosen component might be more adequate to the pattern you're trying to implement.
If you're not accepting names outside a specific list, then a combo box would be your first choice. You're trying to implement text auto complete so you can achieve text search. Am I right?

The only limitation with Chosen right now is if your combo has a lot of lines (+500). Since it's JavaScript, browser freezes might occur (even more on IE, since the JS engine is ran by hamsters running on wheels). But if you don't have that many names, Chosen might do what you need.

See a demo here.
Hi Nikhil,
If your need is exactly a combo box with the features described by António Chinita, this component is what you'll want.
I already used it and it works fine ( my case I worked with real browsers like Chrome and Firefox..) and visually is more pleasable to the end-user.
Hi Nikhil,

Whilst I am very inexperienced with Outsystems, I have however noted that the autocomplete does take some time to load in the back ground. From my limited testing I have found this when 1) the list is very big (>1000 items) or 2) you are using autocomplete on a tablet (I tested on Android). 
I found that when typing before the list is loaded I get similar results to what you describe.
I understand that I have not really provided you with a solution but wanted to pass on to you my experiences with autocomplete.

How big is the list you are autocompleting in? What device are you using this autocomplete on?