how to make a multi-select table, where the secondary selection is based on the first