AdditionalScope for Resource Queries with Google Sheets

Hi everyone,

I have seen it is possible to pass additionalScope when triggering queries (example here: Send data from one JavaScript Query to another - #20 by Chris-Thompson )

I want to use this technique to pass variables to a resource query for google sheets but have not been able to do so. Am I doing it wrong or is it not possible?

@Brooke Welcome to the forum!

It's possible. Can you share more information? Screenshots?

Hi @ScottR,

I have a container underneath a table. The idea is that you select a product row and then use the multiselect dropdown to choose the applicable display categories for the product.


I then want the chosen categories to be written as a pipe delimited string to the 'displayCategories' column of the table for the selected row but can't seem to achieve this behaviour.

The UpdateDisplayCategories button has a javascript script attached that executes on click and created the pipe delimited string (displayCategories) based on the multiselect - at the end of the script I try trigger the update to the table
updateProductDisplayCategories.trigger({additionalScope: {prodDisplayCategories: displayCategories}});

I then try to construct a resource query to update the google sheet as below

The update value in the screenshot should only reference {{prodDisplayCategories}} if I am reading your post about the javascript query that runs before updateProductDisplayCategories

The expected format for the update value section is {"column1": "newValue"}
So not sure what you mean

looks like just adding quotes around the value in additional scope worked!