Autofill dropdown from another dropdown

I’m trying to figure out how to take the option that is choosen from a dropdown, I can fill this in from a mysql database, and autoupdate another dropdown.
I would also like to be able to choose an item from a dropdown and autofill some dynamic table columns and add those columns up. The table will hopefully add another row once the item is added.

I would show code but the first dropdown is a simple dropdown with JS code to run a query from the database, that works. I can’t make the second dropdown work to fill in a table row.

@clarnp49 Don’t think it will be straightforward, but you will need to have the values in the second dropdown in the format that is accepted in a table (array of objects). You can use the same concept shown in this sample app - Appsmith