Just a couple questions ā¦
-
I donāt see a way to add a connector to a local variable. Am I missing it?
-
It looks like you can no longer use a time variable in a between two times RULE (using the new term for an if condition).
Just a couple questions ā¦
I donāt see a way to add a connector to a local variable. Am I missing it?
It looks like you can no longer use a time variable in a between two times RULE (using the new term for an if condition).
Local connectors were retired in this release. We are trying to pull back from connectors in favor of direct use of variables, namely Hub Variables. Also, as part of this, we want to pull back from local variables having uses outside the rule they are defined in. As we added Variable events for Hub Variables, you can see the direction we're going. Connectors added a lot of complexity when done at the local variable level. We don't plan to add events for local variables either (makes them sort of not local).
You can use Hub Variables for this. However, the omission of local variables is partially inadvertent. Note that there is no way to set a local variable from outside a rule. So, as an example, you can't use a local variable as a trigger, or as a Wait event given the lack of means to set one. There will be an update that allows local variables in Between Two Times, et al.
Thanks for your explanation and yes totally understandable.
My use of local variables for time is actually just a convenience. Instead of changing a hard coded value in multiple lines - I use local variables as define constants. Would this be something you could entertain? Not a value that can change outside the rule, just a constant that can be edited in a single location.
My use of connectors on local variables was just an outcome of the change in RM5.0, so not really something I was asking for - I just thought it might be a workaround. But you have already explained this as well.
I do think the local variable section still referenced connectors btw in the pretext.
I understand that connectors for local variables are no longer available in 5.1 and it does not sound like they will be coming back in the future. I use connectors with local variables simply because I would like to display their value on a dashboard. Going forward if I want the functionality of displaying a local variable's value on a dashboard, is my only option a hub variable?, Or am I missing something?
Example:
Yes I realized after I had this exchange with Bruce that I also do this on my debug dashboard and I forgot to mention it.
Bruce mentions that it is adding a layer of complexity. If that layer of complexity needs to be added to the underlying RM app, and this complexity adds a small overhead to every instance of the app running, I can understand why you would want to remove it. But maybe this could be addressed in the actions section of the rule by setting the value of a "Virtual Variable Device", the actions in the rule could set the value of a virtual variable device and then it is this device that could be added to the dashboard. This way the RM app does not have this added complexity, but the ability is still there in the actions sections of a rule for users who desire it.
We introduced Hub Variables into the core hub so that your sort of use is fully supported in the most efficient way possible. Putting variables and connectors into Rules was relatively inefficient and introduced a great deal of complexity, while having limited usefulness. So, the answer to your question is yes, use Hub Variables. There will be further integration of Hub Variables into Dashboard in the future, obviating the need for connectors at all. The only thing given up is the local scope of the name of the variable that exists for Local Variables, but what is gained is worth it if you need to use a variable in other apps. Local and other apps are sort of contradictory.
I was just coming around to using Local Variables for this same reason. Have you changed your approach based on this or subsequent discussions, or with the evolution of RM and variables?
First, I do still have RM5.0 rules with time connectors that I am using as triggers. As Bruce stated above, the RM5.1 change only affects variables used as triggers or in wait statements.
I have moved variables to Hub Variables where I need to trigger on it & it makes sense (does it really belong as a global variable). Hub variables are really nice since you can throw them on a dashboard without a connector. On the flip side I have removed some variables & hard coded them where it didn't make sense to make them globals.