Is there any magic I need to do in order to save an updated value in local storage? I see my values in editor updating, however when I deploy and look at the variable in local storage it never gets updated.
Youâll need to write some logic to check if the variable needs to be updated or not, then if it passes the logic, you can do something like Reset Variable Value.
The problem is that it is never saved in local storage. I am assuming weweb handles the actual saving to local storage when the variable is updated. In my case, it never gets saved in local storage with the updated values.
I am also not sure how to check if the variable itself got updated, as I am not sure how to do that in the deployed version in the console. With normal JS, I can just type in the variable and see it, but I do not know how WW wraps all of the variables. Any pointers?
Hmmm if you run that node, it should reset the value to whatever your default value is, and like always, you can force a new value with the Change Variable Value node.
To view the value in the console, itâs wwLib.wwVariable.getValue('09a7c78a-7417-459d-b3a6-c000f5d4649c')
I figured out what was the problem - I was updating the variable directly in Javascript not through Wewebâs functions and likely this is why the local storage update was not happening. I end up creating a workflow to update the variable the standard way Weweb does âupdate variableâ and called it through: