How to get an array of selected fields?

I want to get a list of selected source IDs in an array format from the integrations_table, how do i do it?

image

You can simply do the following - the assignment below is for preview purposes only in a JS Query, otherwise, you simply can surround the data with [ and ]

var t = [integrations_table.selectedRow.data]; return t

i want [9202, 9201], how do i do that?

basically i just want a list of source IDs selected

the same thing except after data add your column name. data.source_id

apologies I am not that technical, how do I pass the list of values in an API call, do i pass the value t?

i want to make an update call to the list of source_ids selected

It depends on what you want to do with the array of values. Are you updating the records or are you inserting?
Not knowing what the API does or needs to do makes it difficult for me to suggest a solution. Also, can you post more specific details and screenshots?

i need to pass the selected source ids from the integrations_table to this query:

UPDATE table1
SET status = 6
WHERE sourceid IN ( ** list of sourceIDs** )

Run the following in a js query

var t = table6.selectedRow.data;
var sourceIds = [];
for (i=0;i<t.length;i++)
sourceIds.push(t[i].id);
return sourceIds;

Then in your update query
UPDATE table1
SET status = 6
WHERE sourceid IN ( {{yourjsqueryname.data}})

thank you so so much it worked!