So I have two tables one is the main selection table that pulls from one google sheet. The other table is pulling data from a separate google sheet. Both tables have the same id for the property selected in the main table. The 'taskstable' needs to be filtered to only show the matching id that is selected in the main 'leadsTable'. I've tried transformers and json to sql query and could get nothing to work for hours and hours. Please help see photo below.
Hi @growthatfire!
Here's an idea for a transformer whose value could be passed to taskstable
but I'm not sure if it fits your situation:
const taskData = {{taskQuery.data}};
const selectedIDs = {{leadsTable.selectedIndex.map(index => leadsTable.data[index].id)}};
return taskData.filter(row => selectedIDs.includes(row.id));
Would you mind posting an example of something you've tried?
1 Like
Okay sorry for the delay thank you for your reply!
I GOT IT TO WORK! Thanks so much! You da best.
So what I did was use an invisible text field to pull the id from the table selection to simplify the variable. All good thanks again!
const taskData = {{tasks.data}};
const selectedIDs = {{propertyid.value}};
return taskData.filter(row => selectedIDs.includes(row.id));