Valuelist loading error

I add a Filter param when I start my application. So I filter on the organization the logged in user just sees the organization he has the rights on. This works fine.
My Filter looks similar to this:

databaseManager.addTableFilterParam(My_Database, null, "organizationID", "in", _orgArray, "orgFilter")

Now I have a table whit all the occupation form all the organizations. I expect and it is so that the user which is logged in and his filter is applied, just sees the occupation of his organization. That works also.

Now my problem is that I’m always getting the error
“Valuelist organization fully loaded with 500 rows, more rows are discarded!!”

Yes I have a Valuelist and if the filter is not applied it is over 500, but when the filter is applied there are less the 500 records there about 50 – 120!
I use the valuelist to create a COMBOBOX for the user to select a occupation.

Any Idea?

Regards
ttmgybta

and if you look at that combobox, does it has 500 values?
and i guess 400 of them you shouldn’t see?

In the combobox I see the 50 - 120 values I expect and that is, what makes me confused.
Actually everything’s fine in my application, I just have this error in the console.

that is then very weird, the check we do is:

if (dataSet.getRowCount() >= 500) { {
application.reportJSError(“Valuelist " + getName() + " fully loaded with 500 rows, more rows are discarded!!”, null);
}

so it is just a warning for you, that the dataset we got back from the query is really exceeding the 500 limit…

So that valuelist really seems to be loading way more, are you sure you are looking at the same one?
Isn’t that one somehow first loading with everything before the filter?

if you can create an example and attach it to a case then we can look at it

That will be difficult to create a Sample solution.
How do I find out where my valuelist is used?
With code search I don’t fined the valuelist which are configured in a combobox or in my solution.

Did you ever resolve this? We have exactly the same error, i.e. a multi-tenant solution using table filters like
databaseManager.addTableFilterParam(…)
With the filter applied there are only a dozen or so records in the valuelist and yet we see the
“Valuelist xxx fully loaded with 500 rows, more rows are discarded!!” error in the log firing frequently. Huge drain on performance.
This is with WCs on Servoy 5.2.16 running on a debian linux server.

that is just weird, so you say that you get that valuelist has more then 500 rows but when you look at it (when it is attached to a combobox) it doesn’t have that many?

We were seeing the “Valuelist xxx fully loaded with 500 rows, more rows are discarded!!” error in bursts, every few minutes. I changed the VL from a relation to a table and that seems to have reduced the frequency. It will now only happen when the filter is removed and reapplied - of course the full 500+ records are in the dataset when the filter is removed so this is expected BUT I get the error even when the displayed form doesn’t have any fields / valuelists on it (I swap to a “Please Wait” form before removing the filter, which has nothing but a text box on it.)

Is this to be expected? I thought Servoy would only update the valuelist if it was on an active form.

This is in webclient, Servoy 5.2.16

ah but if you remove the filter then it could be that the query will be done so that will result in 500+
then you add the filter again that will result in a second query that has <500

jcompagner:
ah but if you remove the filter then it could be that the query will be done so that will result in 500+
then you add the filter again that will result in a second query that has <500

ah yes, I mentioned that in my post. Question is, why do I get the error even when the displayed form doesn’t have any fields / valuelists on it. What’s triggering the query?

the call to removeTableFilters is doing that
ValueLists listen to that and do refresh them selfs if you remove it.
This is done right away because we don’t know where the valuelist can be used, the valuelist again fires its changes so that ui stuff will update

OK, thanks, so we can just ignore it. Then it’s really a warning rather than an error, can that be changed in the logging please?
Can you suggest a better way to handle the VLs? (Please don’t say ‘use a typeahead’. The users want to see a short, filtered list of available options appropriate to them.)

based on relations?
Is even way quicker because those could be cached.

That’s what I had originally, with a global relation g_current_tenant to tenant_id so the resulting foundset shouldn’t have increased when the filter was removed. I got the 500+ records error just the same.