I have a flow which sets a global variable, and the flow gets triggered by a cronjob.
Outside the editor i.e. in the normal usage of the phone, the flow does get triggered according to the time set, and the variable does change. However, if I open the editor, the value of the global variable gets reverted to the previous value, which was set while I was editing the preset.
To summarize, if a global variable is updated using flows, it’s value does not get updated in the editor, and hence on opening the editor, the previous value gets set.
As far as I know, the value of a global variable will be preserved every time we save/export preset as a file. And every time we open the preset in the editor, the global variable will contain whatever values it was previously saved in the preset file.
This is “by design” currently. A global is not persistent to preset reloads, if you reload a preset on screen or on the editor the global will return to its saved state (so the state the editor saved it to).
I am planning to add a persistency layer to flows or maybe a way to persist globals with a flag but right now there is not way to do this unless you use a flow and write/read from a file every time you need to set a value.