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” ?
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…
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 ?
what view is case 2?
recordview?
Both cases with tableview.
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
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.