CSV DB record as table filter, how to set valuelist?

I have 2 tables like in the example:

TABLE_X:
id: 1
value:val1
myfilter: 50,60,70

TABLE_Y:
id: 50
value:val1
myfilter: …,…,…

id: 60
value:val2
myfilter: …,…,…

id: 90
value:val3
myfilter: …,…,…

The table_x myfilter column filter the id in the table_y etc. (more than 2 level deep)

I have to create a series of valuelists based on this schema, but after I get the myfilter record in an array of id I haven’t no idea how go on.

I tried addTableFilterParam on on_change event with “IN” condition but it seems not work…

I don’t think you schould use any table filters but just a query to get your data for the valuelist, like this:

var ids = ‘50,60,70’

var query = ‘select TABLE_Y.value , TABLE_Y.id from TABLE_Y WHERE TABLE_Y.id IN (’+ ids +‘)’;
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, 250);

application.setValueListItems( ‘yourValuelistName’, dataset)

ok, I wanted find a more legant solution but is the same.
:)