Send data from one JavaScript Query to another

Hey @brettski!

Happy to help here! This is a screenshot of the triggered query, query1 if no value is passed in via additionalScope


If triggered by another query and additional scope is passed in like this:

Then query1 returns the passed value:

triggered_query copyable code here:

query1.trigger({additionalScope: {
randomKey: "passed value"
}});
query1 copyable code here:
if (typeof randomKey === 'undefined') { var randomKey = "value I want if It isn't passed in additionalScope" }

return randomKey;
Hope this helps, let me know if you have any questions! :slight_smile: