Variables in Rule Machine

When you've set up a local number variable in a specific rule, is it possible to go back and edit the value without having to delete the variable and recreate it?

If I have to delete the variable and recreate it with a new numerical value, will that mess up my existing actions using that variable even if I recreate the variable with the exact same name?

You should be able to edit the value from the "Create, set or delete local variables" page. Just click/tap on the value of the variable, and it should give you the ability to update the value. This works in Rule 5.x; in Rule 4.1 (didn't test anything before this), you'll have separate "Set" column with a link you can use. Same result either way.

But because I was still curious about the deletion and recreation: I just tested this, and it worked in the long run, though in the short term it did result in "broken action" (not surprising, since the variable name does not exist at that point). It's possible this could truly break something I didn't test, but in my (limited) experience I didn't find anything. (If either of the above weren't options, you could also temporarily add two actions to the beginning of the rule to set the variable and then exit rule, manually run the actions, then remove these temporary actions--but I don't think that should be necessary.)

1 Like