# Type ahead

**URL:** https://forum.servoy.com/t/type-ahead/11688
**Category:** Classic Servoy
**Created:** [February 1, 2010, 9:22am UTC](https://forum.servoy.com/t/type-ahead/11688 "2010-02-01T09:22:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![lwjwillemsen](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lwjwillemsen/32/4987_2.png) [@lwjwillemsen](https://forum.servoy.com/u/lwjwillemsen)
#### Post date: [February 1, 2010, 9:22am UTC](https://forum.servoy.com/t/type-ahead/11688/1 "2010-02-01T09:22:19Z")

</div>

Hi ,

I am using type\_ahead elements with attached valuelist via global method. This works fine.  
What I want is to match in my type\_ahead with words that are at any place in the valuelist display values and not only matching from the left side.

Example valuelist display value, real value:

[“yellow submarine”, 22]  
[“brown sugar”, 24]  
[“mellow yellow”, 25]

If I type _yellow_ I want both values (yellow submarine and mellow yellow) in my display list and not only the “yellow submarine”.  
I adapted my query (% + text + %) to my wish but Servoy does a from left matching when displaying the display value list.

Any ideas ?

---

<div class="post-metadata">

### Author: ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)
#### Post date: [February 1, 2010, 12:59pm UTC](https://forum.servoy.com/t/type-ahead/11688/2 "2010-02-01T12:59:44Z")

</div>

use the new global method valuelist in 5.0  
Then you can decide what to return on input.

---

<div class="post-metadata">

### Author: ![lwjwillemsen](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lwjwillemsen/32/4987_2.png) [@lwjwillemsen](https://forum.servoy.com/u/lwjwillemsen)
#### Post date: [February 1, 2010, 2:28pm UTC](https://forum.servoy.com/t/type-ahead/11688/3 "2010-02-01T14:28:37Z")

</div>

Hi Johan,

As said I am already doing that !!

The type\_ahead display list is not visible any more after typing two keys or more that don’t match (from the left) the display list…

I hope you understand what I mean…

Regards,

---

<div class="post-metadata">

### Author: ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)
#### Post date: [February 1, 2010, 3:42pm UTC](https://forum.servoy.com/t/type-ahead/11688/4 "2010-02-01T15:42:49Z")

</div>

but is your global method called? asking for values?

---

<div class="post-metadata">

### Author: ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)
#### Post date: [February 1, 2010, 3:48pm UTC](https://forum.servoy.com/t/type-ahead/11688/5 "2010-02-01T15:48:50Z")

</div>

i guess your global method is not fired at all.  
i think i know why that does happen. I will fix it so that when ever the user types something the global method is called.

---

<div class="post-metadata">

### Author: ![lwjwillemsen](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lwjwillemsen/32/4987_2.png) [@lwjwillemsen](https://forum.servoy.com/u/lwjwillemsen)
#### Post date: [February 1, 2010, 3:59pm UTC](https://forum.servoy.com/t/type-ahead/11688/6 "2010-02-01T15:59:38Z")

</div>

> jcompagner:  
> i guess your global method is not fired at all.  
> i think i know why that does happen. I will fix it so that when ever the user types something the global method is called.

Hi Johan ,

It seems as the global method is not always fired when typing in type\_ahead modus. The first firing is ok, after the second key my list is empty (as it should not be)
