# getValueListDisplayValue limitation

**URL:** https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528
**Category:** Classic Servoy
**Created:** [July 27, 2010, 5:52pm UTC](https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528 "2010-07-27T17:52:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![achiary](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@achiary](https://forum.servoy.com/u/achiary)
#### Post date: [July 27, 2010, 5:52pm UTC](https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528/1 "2010-07-27T17:52:15Z")

</div>

We are using valuelist over large tables with typeahead, it works great and our UI is not affected by the fact valuelists (table and related) have a 500 elements limitation.

This limitation seems to work when “selecting” a value , because we never had problems to display values even in large tables.

But now we are writing a method to let the user export what he is seeing in the screen and so, for fields with valuelist attached, we are using application.getValueListDisplayValue to get the display value; we are finding we can only get display values for the first 500 real values.

Are we missing anything ? Any workaround ?

Documentation says application.getValueListDisplayValue will not work for related or method valuelists, so I assume using a method valuelist as fallback valuelist will not help.

Any other way to retrieve what the user is “seeing” ?

---

<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: [July 27, 2010, 9:30pm UTC](https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528/2 "2010-07-27T21:30:04Z")

</div>

yes it will not work for related stuff  
Problem with database values is that for a Typeahead field we have a special holder for values that fall out of the 500 that you will not get to when using application.getValueListDisplayValue()

For this you need to query it your self  
Or use something like element.mytext.selectAll() element.mytest.getSelectedText() that could also work…

---

<div class="post-metadata">

### Author: ![achiary](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@achiary](https://forum.servoy.com/u/achiary)
#### Post date: [July 29, 2010, 2:53pm UTC](https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528/3 "2010-07-29T14:53:54Z")

</div>

Thanks Johan.

We are trying with selecting the text and found the following :

Case 1 - working on a main form :

controller.setSelectedIndex(i)  
elements.proveedor\_id.requestFocus()  
elements.proveedor\_id.selectAll()  
var id=elements.proveedor\_id.getSelectedText()  
application.output(id)

it works OK, in variable id we get what the user is actually seeing.

Case 2 - working on a form whiich is inside a tabpanel of teh main form :

forms[gidformactual\_to\_forms.nombre].elements[elems[j]].requestFocus()  
forms[gidformactual\_to\_forms.nombre].elements[elems[j]].selectAll()  
var id=forms[gidformactual\_to\_forms.nombre].elements[elems[j]].getSelectedText()

It does not work, in variable id we get null values.

ANy idea why the difference ?

---

<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: [July 29, 2010, 3:44pm UTC](https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528/4 "2010-07-29T15:44:23Z")

</div>

what view is case 2?  
recordview?

---

<div class="post-metadata">

### Author: ![achiary](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@achiary](https://forum.servoy.com/u/achiary)
#### Post date: [July 29, 2010, 4:01pm UTC](https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528/5 "2010-07-29T16:01:27Z")

</div>

Both cases with tableview.

---

<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: [July 29, 2010, 4:33pm UTC](https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528/6 "2010-07-29T16:33:39Z")

</div>

that could be a bit tricky in one go.  
Is the tableview of the tabpanel really already in editing? requestFocus does that but the actual editing could be a bit later.  
So then the editor where you call select() on and so on isnt there yet.  
So this will always be a bit of a hack.

What you could also do is make a none stored calc that does the same thing as the valuelist for that row so that it resolved the id to a value

---

<div class="post-metadata">

### Author: ![achiary](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@achiary](https://forum.servoy.com/u/achiary)
#### Post date: [July 30, 2010, 2:37am UTC](https://forum.servoy.com/t/getvaluelistdisplayvalue-limitation/12528/7 "2010-07-30T02:37:31Z")

</div>

We finally made it work : case 2 was failing because form was set read only (so requestFocus can not work).

We set the form to read\_only : forms[gidformactual\_to\_forms.nombre].controller.readOnly = false

and then proceed; it works even for non\_editable fields.

Good way to get (and in our case export to a file) what the user is seeing.

Thanks Johan : when you said “Is the tableview of the tabpanel really already in editing? requestFocus does that but the actual editing could be a bit later.”, we found the difference between both cases.
