I can replicate your problem once. The global_telkampret (I have created after Automagic 1.36.0), change it to string .*text. And suddenly it changes itself to number 1 after the script execution. Don't know why. After assigning the value directly in script
Code: Select all
global_telkampret = ".*text";
matches("hello,adsf,text", global_telkampret);
use that directly, it works. But if I comment that line (since the glovar has been saved), again, it changes itself to 1 after execution.
Assigning temporary variable to it also doesn't matter.
Code: Select all
a = global_telkampret;
matches("hello,adsf,text", a);
This still produce the same error, global_telkampret changes to 1 after execution.
However using the exact same script but with global_widget, same string type, no problem at all. global_widget was created long long time ago. So it seems something is off with the glovar creation.
Then I just remembered I have used this glovar somewhere, not a temporary glovar anymore. And yes I used it in a working flow as the marking for state

The script change the glovar to 1 when it change to something else. Hence explained the mysterious behaviour. You should search for the global_var in your flow and see if there something changing it to another thing.