Multiselect - Get value from connector table

I’m trying to make a multiselect option, that instead of having checkboxes, has dropdowns (to indicate progress on each item). I’m fine with the UI, but am having problems with the server-side part of it.

I’m using the following code:

$todoCross->options->render_table("todo","todo_id","todo_id(value),todo_name(label)"); $todoCross->link->render_table("event_todo","event_id","todo_id,event_id,status");

When I call ‘scheduler.serverList(“todo_id”)’ I get an array of objects with the properties ‘key’ and ‘label’. As well as these, I would like to also get the property ‘status’ from the ‘event_todo’ table (as shown in the code above).

Can I do this with this system?

And along with that, getting the value of ‘event_id’?

Thanks :slight_smile:

Is this possible?

Above will not work, data from “link” connector will be used only to link records, it will not be included in output.

You can try to use use the next to workaround the issue

//not tested, can contain typos $todoCross->options->render_sql("SELECT event_todo.status, todo.todo_id as value, todo.todo_name as label from event_todo inner join todo on event_todo.todo_id = todo.todo_id", ,"todo.todo_id","value,label,status"); $todoCross->link->render_table("event_todo","event_id","todo_id,event_id");

As only options connector does matter, you can use both tables in it, by using render_sql and join.
If it still doesn’t work, try to enable logging and check which requests it produces to fetch options.