Firstly, can I just say that I really like Retool! Having mashed together end-user-computing for many years using those MSoft products, its refreshing to find something that is more adaptable and professional! I am 2 days old as far as Retool is concerned
Secondly, can I apologies for what may be a simple question but its has beaten me after a number of hours!
Here goes. I have 2 table - one holding a list of charities and another with a list of causes. They are linked together using a FK of cause_id. I am trying to show a list of charities in a table with the current cause from when the record was created. I am then trying to get allow the user to update that cause choosing from a list of records from the causes table (inline edit). I then need to update that new cause_id once saved.
I have a list active charities query saved in the Query Library:
select
c.id,
c.created_at,
c.charity_name,
c.company_id,
c.website,
c.address_line_1,
c.address_line_2,
c.address_line_3,
c.address_city,
c.address_postcode,
c.updated_at,
cause.cause_name,
cause.id
from
charities c
left join charity_causes cause on c.cause_id = cause.id
where
c.deleted_at is null
and pulling the causes directly from the postgres db for the tag-dropdown:
select * from charity_causes
where deleted_at isnull
I have a third query called update_charity which i have set to run on-change' of the cause_name. I am trying to 'bulk update from primary key' using {{ tbl_charities.changeObjecrt }} but I am getting "Data must be an array" error.
So in summary 2 problems:
1 - how can i get the table to show the current cause_name and then produce a drop down list from get_causes for edits?
2 - Once edited, how do I update the get_causes.cause_id to save in my charities table.
Thanks in advance