I am trying to update a local variable (in the variables tab) through an interaction in a custom code sandbox. I am able to access and read the variable in the code sandbox by adding it into the state section in the interactions tab.
However, how do i set this variable? I am currently using SlateFunctions.setState("<var_name>", <var_value>)
in my javascript code within sandbox, but i think that just updates the state in the context of the sandbox widget, not the actual variable in the larger slate. Would i use an event or action to do this? and if so, how can i pass in parameters from the state to these events/actions?