Working with modal values into tables

Hello guys, So I have a modal and inside some labels and a multiselect dropdown like showed in image.
Also I have a table that I excpect to be filled in in one of the colums with the values from the multiselec dropdown after I hit button create. Is there a way to achieve this? Also How Can I close modal when I click the create buton and just see the table?
Thank you

So, to close the modal, once the event to populate the table is complete you ca add the Event trigger in Success as a Control Component trigger to close that modal.

Since I don't know how that table is initially populated (db query?) I don't know what to try to populate that column with the data from the modal multiselect field.
Seems to me that you would take that multiselect data, put it in a db or a temp state and then add it to the data for the table (is the table an array?) and then reload the table...

Also, is that modal a user action directly related to that row in the table?

A little more context will help me help you.

Hey @ScottR yes you are correct. First , The multiselect comes from a simple "select from" DB query. Both Label and ID
On the other hand table is empty at beginin, and only has the column names. So, After I Open Module and select an ID and Label, I pretend that those values get inserted into column id and name in table and that module get closed. Also pretending to add Name and Description from module, outside the table in a Text like "Table name": test1 and "Description": Some description. This should be done after you clic the Create Button. Does it make sense?.

This will create "Dashboard" which is going to be populated with some values in the table from modal and some other values outside the table (also from modal).

It kind of makes sense but without knowing the context, it's difficult for me to say how you would do this.

  1. Start with your db and populate the multii-select dropdown.
  2. Select multiple items and iterate over that data and update another table and also update a text field? (I suppose you could do this with a js query and using a temporary state variable.)

the multiselect dropdown is already populated from a DB. I just showed the values foo and bar as example, but now it actually has real values that came from a db table. The Idea now is to fill in the table whith those values. How would you "Select multiple items and iterate over that data and update another table" as you said in point 2?

Just iterate over the selected labels and values and then return that data in a js query.

Then use the return data to populate the table component