Increasing the amount of values in a valuelist

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Increasing the amount of values in a valuelist

Postby alasdairs » Tue Jul 09, 2024 12:43 pm

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
Software Engineer
alasdairs
 
Posts: 51
Joined: Wed Dec 27, 2023 10:06 pm
Location: The Internet

Re: Increasing the amount of values in a valuelist

Postby alasdairs » Tue Jul 09, 2024 1:31 pm

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.
Software Engineer
alasdairs
 
Posts: 51
Joined: Wed Dec 27, 2023 10:06 pm
Location: The Internet

Re: Increasing the amount of values in a valuelist

Postby amitchell1698743475 » Tue Jul 09, 2024 1:47 pm

Hi alasdairs,

Have you tried the below?

Code: Select all
application.putClientProperty(APP_UI_PROPERTY.VALUELIST_MAX_ROWS, 500);

Cheers,

Alex.
amitchell1698743475
 
Posts: 1
Joined: Tue Oct 31, 2023 11:11 am

Re: Increasing the amount of values in a valuelist

Postby robert.edelmann » Tue Jul 09, 2024 1:58 pm

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.
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 103
Joined: Wed Aug 14, 2013 6:12 pm

Re: Increasing the amount of values in a valuelist

Postby alasdairs » Tue Jul 09, 2024 3:14 pm

Hiya,

Thank you both,

amitchell1698743475 wrote:
Code: Select all
application.putClientProperty(APP_UI_PROPERTY.VALUELIST_MAX_ROWS, 500);



It's telling me its deprecated. Working in NG at the moment.

robert.edelmann wrote: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.

Code: Select all
   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)
Software Engineer
alasdairs
 
Posts: 51
Joined: Wed Dec 27, 2023 10:06 pm
Location: The Internet

Re: Increasing the amount of values in a valuelist

Postby robert.edelmann » Tue Jul 09, 2024 4:07 pm

Our lookup is something like this:

Code: Select all
/**
* @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.
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 103
Joined: Wed Aug 14, 2013 6:12 pm

Re: Increasing the amount of values in a valuelist

Postby mboegem » Tue Jul 09, 2024 4:09 pm

alasdairs wrote: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?


Works for me
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1765
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Increasing the amount of values in a valuelist

Postby steve1376656734 » Thu Jul 11, 2024 3:56 pm

Hi Alasdair,

alasdairs wrote:
amitchell1698743475 wrote:
Code: Select all
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
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 335
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 11 guests

cron