I have seen discussion on this topic, and I couldn't find the solution.
The problem is the following:
I'm orking with the list of tables that is displayed in a List Box. I use N Table() way of getting a list of names for all the tables.
What I want is that if I click to select any lines in that list - the list itself updated and checked if there are new opened tables or some tables were closed.
Good wat to do that is to use Set Items(openDTs) each time I click to select. It updates the list of tables just fine - the problem is it drops the selection.
If I use Append(openDTs) on the List Box - it adds whatever new tables were opened, but if I close the table, it does not delete the closed table.
What is the most elegant and correct way of having the list of the tables being updated, reflecting opened and closed tables upon any click on the list, so that selection is kept?