# TYPE\_AHEAD doesn't display valuelist...

**URL:** <https://forum.servoy.com/t/type-ahead-doesnt-display-valuelist/13935>\
**Category:** Classic Servoy\
**Created:** [May 5, 2011, 7:06am UTC](https://forum.servoy.com/t/type-ahead-doesnt-display-valuelist/13935 "2011-05-05T07:06:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [May 5, 2011, 7:06am UTC](https://forum.servoy.com/t/type-ahead-doesnt-display-valuelist/13935/1 "2011-05-05T07:06:34Z")

</div>

…if the valuelist comes from a table and display values come from a calculation.  
If I change the display type of the field on the form to ‘COMBOBOX’ then everything is fine, otherwise calculation is not working, the list is empty.

Here’s the calculation:

```auto
function typename_i18n_label()
{
	var label = i18n.getI18NMessage(typenamei18nkey);
	
	return label;
}

```

Here’s the valuelist definition:

[attachment=1]ss.png[/attachment]

Here are table values:

[attachment=0]ss1.png[/attachment]

Should I create a ticket for this?

Cheers,  
Maria

 ![ss1.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/d/d84e2531535c3567839e0c238bef1e336fdfaa85.png)

 ![ss.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/1X/67778000fcf1bec25807b7ddf0f6bbbcf83dbac5.png)

---

<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:** [May 5, 2011, 8:09am UTC](https://forum.servoy.com/t/type-ahead-doesnt-display-valuelist/13935/2 "2011-05-05T08:09:17Z")

</div>

i guess that calculation is not stored?  
Then it will not work, typeaheads can only work on stored data for the display values  
This is because it is a typeahead, that means it searches for you when you are typing and that searching is done by direct queries to the database.  
So if a none stored calc would be able to work, then we need to search in memory, that would mean that we need to get all the rows from the database to be able to calculate the display string. that really hinders performance.

---

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [May 9, 2011, 12:16am UTC](https://forum.servoy.com/t/type-ahead-doesnt-display-valuelist/13935/3 "2011-05-09T00:16:11Z")

</div>

> jcompagner:  
> i guess that calculation is not stored?  
> Then it will not work, typeaheads can only work on stored data for the display values  
> This is because it is a typeahead, that means it searches for you when you are typing and that searching is done by direct queries to the database.  
> So if a none stored calc would be able to work, then we need to search in memory, that would mean that we need to get all the rows from the database to be able to calculate the display string. that really hinders performance.

That’s understandable, Johan.  
Just to be clear on this, Servoy is not planning on changing typeaheads to feed from non-stored calculations, correct?

Cheers,  
Maria

---

<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:** [May 9, 2011, 8:20am UTC](https://forum.servoy.com/t/type-ahead-doesnt-display-valuelist/13935/4 "2011-05-09T08:20:44Z")

</div>

not in the near future.

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [May 10, 2011, 7:40am UTC](https://forum.servoy.com/t/type-ahead-doesnt-display-valuelist/13935/5 "2011-05-10T07:40:39Z")

</div>

Maria,

As an alternative, you could create a dataset with the values and the messages.  
From that dataset you could create a datasource and from the datasource you could create a db-valuelist using the solutionmodel.

Every time the user changes the language you would have to refill the datasource (just create the with the same name again).

Hope this helps,

Rob
