How to use save changes to update records of a join table?

Hello there!
I have a Retool table which is populated by a LEFT JOIN statement like this:

SELECT c.*, e.end_of_contract
FROM checklist c
LEFT JOIN 
employee e
ON
c.employee_id = e.id

Now, if I try to perform a bulk update via primary key with the GUI Mode and the "save changes" button Retool returns an error.
GUI mode only lets me select one table, and of course my table1.recordUpdates won't work because e.end_of_contract does not exist in the checklist table.

Is there any way I can perform an inline edit of a JOIN table without using an inline action button?

Hey @axelz! I'm curious if you might want to use a mapper on the recordUpdates property of your table to select those columns you want to update. There's a post here that goes into more detail on that. Can you let me know if it helps?

Hi @Kabirdas. I already tried a similar solution I found in a different thread, using _.omit and _.pick.

I find this map option very useful in general but for my specific case it doesn't work:

The thing is that I cannot update values from both tables at the same time, since if i run the query {{table1.recordUpdates.map(row => _.omit(row, ["end_of_contract"]))} and on success run {{table1.recordUpdates.map(row => _.pick(row, ["end_of_contract"]))} the last one will update no records. That's because 'Save Changes' once completed reload the table content and resets the update I made on e.end_of_contract

Got it, have you tried either running them simultaneously or triggering them both in a JS query and having that be the event handler for your table?