dynamic dropdown in dashboard sidepanel

...I am writing an app for updating various reference tables. There are over 400 tables in 30 different groups. I would like to have the groups in the sidebar of a dashboard with the tables under that group in a dropdown selector. The database reference tables are controlled by a query to the same database, and I would like to make the dropdown selector dynamic based on the query to the control table. I am looking for advice on how to make this dynamic.