Hi all,
Is there any way to increase the amount of values in a valuelist? I’ve seen a lot of posts from 10+ years ago saying it’s limited to 500 (found the same with my app) but I was wondering whether theres a spec file I could change somewhere or whether theres been an update to increase this? The value list I’m adding needs around 800 values. I could switch this out for a servoy lookup table, but would be nice to know anyways.
Thanks,
Alasdair
Quick update, I just tried changing it to a servoy lookup table and on loading that popup, it’s unregistering the popup I’m currently on, so you cant get off it. I tried using plugins.window.cancelFormPopup, but it hasnt worked.
Hi alasdairs,
Have you tried the below?
application.putClientProperty(APP_UI_PROPERTY.VALUELIST_MAX_ROWS, 500);
Cheers,
Alex.
I have some fields that use valuelists that have more than 500 entries, which come from tablevalues.
The problem is not that this is impossible, it’s rather a problem that you cannot access more than 500 in a combobox. You can use a typeahead instead, which gets automatically filtered.
We usually have either the typeahead or a textbox with a separate button that opens a lookup-form.
Hiya,
Thank you both,
amitchell1698743475:
application.putClientProperty(APP_UI_PROPERTY.VALUELIST_MAX_ROWS, 500);
It’s telling me its deprecated. Working in NG at the moment.
robert.edelmann:
You can use a typeahead instead, which gets automatically filtered.
I would but I also don’t want people typing something that isn’t part of whats found by the search.
At the moment I have it working, but the form I’m working on is a popup itself. So when showing the svyLookupNGTable, the prior popup form seems to lose some popup properties. Do either of you know how I could go about fixing this?
Heres the code I’m using to show the svyLookupTable.
vfoundset.sort('business asc')
var lookupObj = scopes.svyLookup.createLookup(vfoundset);
lookupObj.setMultiSelect(false).setLookupForm(forms.svyLookupNGTable);
// add fields
lookupObj.addField('business').setTitleText('Business');
// show pop-up
lookupObj.showPopUp(onSelect, elements.selectBusinessBtn, 200, 412)
Our lookup is something like this:
/**
* @param {Function} callbackFunction
* @param {JSFoundSet<db:/bauprocheck/projekte>} [fsProjekte]
*
* @properties={typeid:24,uuid:"74C7DB31-3269-4CB3-86F7-E46514D80376"}
*/
function showProjekteLookup (callbackFunction, fsProjekte) {
if (!fsProjekte) {
fsProjekte = databaseManager.getFoundSet('bauprocheck','projekte');
fsProjekte.loadAllRecords();
fsProjekte.sort('schluessel, bezeichnung_1, bezeichnung_2, bezeichnung_3')
}
var lookup = scopes.svyLookup.createLookup(fsProjekte);
lookup.addField('schluessel').setTitleText('Schlüssel').setSearchable(true).setWidth('85px');
lookup.addField('projekte$uebergeordnet.schluessel').setTitleText('Hauptprojekt').setSearchable(true).setWidth('85px');
lookup.addField('bezeichnung_gesamt').setTitleText('Bezeichnung').setSearchable(false).setWidth('590px');
lookup.addField('bezeichnung_1').setTitleText('Bezeichnung 1').setSearchable(true).setVisible(false);
lookup.addField('bezeichnung_2').setTitleText('Bezeichnung 2').setSearchable(true).setVisible(false);
lookup.addField('bezeichnung_3').setTitleText('Bezeichnung 3').setSearchable(true).setVisible(false);
lookup.setLookupForm(forms.bpc_lookup_table);
lookup.showModalWindow(callbackFunction, -1, -1, 800, 500);
}
We receive the filtered/sorted foundset (or load everything and sort with defaults), define which fields are shown / are searchable. We have a calculation that we show but that can’t be searched and the sources / fields that can be searched but would clutter the list.
We set the lookup-form (simple form with a search-field and a table), you should find examples in the github-repo of svyLookup.
And then we show the lookup in a modal form because we want to keep the lookup on top.
You can find more examples in the wiki on https://github.com/Servoy/svyLookup/wiki, perhaps the othen ways of displaying are suited for your workflow.
Hi Alasdair,
alasdairs:
amitchell1698743475:
application.putClientProperty(APP_UI_PROPERTY.VALUELIST_MAX_ROWS, 500);
It’s telling me its deprecated. Working in NG at the moment.
Replace the APP_UI_PROPERTY with UICONSTANTS.
That should fix the deprecated message.
Thanks
Steve