Hi! I've made a couple apps with multiple editable tables, and here's how I've done it.
Disclaimer: my tables tend to be pretty small so I'm not really concerned with doing operations the most efficient way. I'm also typically pulling values out of my tables to use in calculations and then writing calculation results to other tables or plotting them. These two things drive my approach, but for your specific application there could be other drivers.
- Initialize the tables in the startup function
- Create a celledit callback for each table. In the callback, I just put the updateTable_(app) function for the respective table.
- Create a private update table function for each table. I either store the values in the table in properties (option 1) because I use them to do other calculations throughout the app or write property values to the table (option 2) because I've calculated a quantitity and I want to display it in the table.
- I'm not 100% sure what you mean by insert values into your second table. If you mean add rows to your table here's what I do: To insert values into my tables, I have a button to add a table row. When the row is added, it is initialized with a set of values, then I use the appropriate updateTable_(app) function for the table to store all the values into properties again. After that, I can edit the fields in the new row of the table or the previous rows without anything happening to the other rows/cells. If by insert values into the second table you mean edit the cells, having the celledit callback function for the table with the updateTable_(app) function should take care of holding previous values.
Hope this helps! If not, if you could provide some more details and/or some code, I could try to recreate your isssue and work it further.