Using the same variable across multiple components

Sometimes I want to be able to share a variable among several components. For instance, I might have a graph component where I store the result of some complicated bit of code in a variable called result, but I’d also like to use the value of result inside of a note or action button without having to duplicate the complicated logic in several places. Is that possible?

You can access a variable defined in one component inside of other components by using the componentName.script.variableName pattern.

For example, if you have the variable result defined inside of a component called graph, you can access the value of result anywhere in the activity with graph.script.result.