Using the Stripe integration, I'm doing
myStripeQuery1.trigger({ onSuccess: function(data) { myStripeQuery2.trigger({ // Passing a parameter here coming from "data" }) } })
How would I go about doing that ?
When you trigger queries inside a ‘Run JS Code’ query, you can pass in this special variable called additionalScope
myStripeQuery1.trigger({ onSuccess: function(data) { myStripeQuery2.trigger({ additionalScope: { charge_id: data.id }, }) } })
Now, inside myStripeQuery1, you can use {{ charge_id }}
and it will know to use the value from additionalScope
Thanks