I'm afraid if you make valuelists by query, that it will affect your performance, because it would execute each time you use the valuelist.
I use queries to fill most of my valuelists, using a dataset
- Code: Select all
var _id_array = _ds.getColumnAsArray(1)
var _desc_array = _ds.getColumnAsArray(2)
application.setValueListItems( 'myValuelist', _desc_array, _id_array);
And I only refresh the valuelist in case that I think it is useful.
Data that is almost static , I load once using the onLoad of the form where it is needed. So during the time my application lives, this kind of valuelists are not reloaded again.
So even when it can be handy to have valuelists by query, I'm afraid from performance point of view, it would perhaps be better not to do it like this.