my app is rendering some data as table1 with columns name,id,something. The table has multi-row select enabled, so that the user can select all rows that match his/her criteria.
I know want to use all id values of the selected rows in a a follow-up GBQ query to be the constrain in a where clause, like:
select * from new_table where new_id in ({{table1.selectedRow.data.id}})
I cannot figure out a way to get the criteria of the in-statement to be something like "id1","id2","id4).
Here is one way I believe you can do this (haven't tried).
Create a temporary state variable called 'selectedRowIdList'
Add an 'onRowClick' event handler to the table that calls a JS Query
In that JS Query take the id values from the selected rows in the table and add them to the 'selectedRowIdList' variable as an array
In that same JS Query trigger the query to run
Set the 'in' clause value for the query to be ({{ selectedRowIdList.value.toString }}) <-- I believe this will create a comma separated string of the id's for you
Note: if the data type for the id's is a String you may need to format the temporary state variable to have qualified values (e.g. 'id-1', 'id-2', 'id-3')