C7 v2.3 How to create a global variable?

This should be something super simple but for the life of me I can't figure out how to create a global variable. I just don't see that option on the Machine Rule screen.

Settings | Hub Variables

2 Likes

awww. beat me. go back to bed!

2 Likes

Just to note terminology, "global variables" are a Rule 4.x feature. They are specific to Rule Machine, though they eventually became available for outside use by way of optional "connector" devices.

"Hub variables" are what is described above (and what you're looking for now). They have been moved out of Rule Machine into a hub-wide feature. Apps are now able to access them directly, which an increasing number of built-in (and community) apps have started doing, though connector devices are still available. The parent Rule Machine app was also changed, as you probably noticed if you also have older rules, because of this change. They are more efficient because they don't have to go through the Rule Machine app, and their configuration is found outside Rule Machine because, unlike before, it's no longer an RM-specific feature.

Glas you found it, and good luck!

Thanks for all your responses.

After playing with variables for a couple of hours, I'm not sure I want to use them. After adding them in a few rules, one of my rules broke and is reporting a null pointer exception.

Probably my mistake I'm sure, but the fact that I can't even edit the rule and fix it is a big no-no. I had to delete the rule and recreate it from scratch.

I have found that this happens sometimes when clicking too fast or using the back button. Restarting from scratch is the right approach, unless you have a backup that you can easily restore with the rule in it.

1 Like