How can multiple variables be used in additional scope?

How do I use multiple variables in AdditionalScope to pass from JS to SQL. I have a JS that creates the field names and values into two variables. So the SQL is INSERT INTO tablename ({{fieldNames}}
VALUES ({{fieldvalues}});

Is there an example of passing multiple variables in the AdditionalScope?

Thanks

Hi @ricky-raven! Definitely You'd pass the key:value pairs into the additionalScope option like so:

query1.trigger({
 additionalScope: {
   catId: table1.selectedRow.data.catId,
   dogId: 5,
   other: 'hi'
 }
})
1 Like