valueLists and repository

Is there a way to synchronize valueLists with Servoy’s repository from a smart client?

What I would like to do is:
allow users to decide the content of valueLists on a smart client application and have them available for the rest of the users when they start their smart client

Hi,

You can make the valuelist data-driven by adding a ‘valuelist_name’ column to the table your values are in and put the name of your valuelist object in there.
In the valuelist definition you need then tick the “Apply valuelist name as filter on column ‘valuelist_name’” checkbox.
All you then need to do is provide a form for the users to add/edit/delete these valuelist records.

Hope this helps.

That means that I will not have my valueLists’ content on the repository any more.
I just have the content on my own database model, right? And the valueList’s name both on Servoy and on my database model

what do you mean with valuelist contents in the repository?
By using custom valuelists?

That’s right. i was talking about custom valueLists

Thanks a lot for your help :D
I think it is a good enough solution to us.

Regards,
Miguel.-

Well, in fact it does NOT work.
I realized that we have trouble with the i18n.

If I use Servoy’s table values and apply valuelist name as filter, I don’t get i18n data.
No matter if the valuelist item is stored as a [key] or as [i18n:key], Servoy will not take into account the language.

Solution:
To create a global method on Servoy’s startup to reload all value lists…
var query = ’ QUERY TO RETRIEVE ALL MY LISTS ';
var dsListQueries = databaseManager.getDataSetByQuery(SERVER_NAME, query, null, -1);
for (var i = 1; i <= dsListQueries.getMaxRowIndex(); i++) {
var contentQuery = ’ QUERY TO RETRIEVE CONTENT ON MY LIST ’
var dsListValues = databaseManager.getDataSetByQuery(SERVER_NAME, contentQuery , null, -1);
application.setValueListItems(VALUELIST_NAME, dsListValues);
}
I guess this will be a bad hit on performance, but this is the only way I found out…

Should I report this as a bug ??