I’m puzzled by the fact that if I move a global variable in my function list into a group in that list, the graph that uses this Global Variable complains that it can’t find it anymore.
Isn’t the point of Global Variables that they are globally available? So why should it matter if I move it into an (organizational) group in the function list?
Perhaps I’m doing something wrong here, but if not, it seems this could be changed in a future update?
Thanks for your input. This is something we have debated here at VDT!
Here is a little background. The global variables are the one place we enforce unique names. We added groups within the global variables in later. When a variable is in a group, its name changes globally to “group:variable”.
To illustrate with an example, for those that might not be familiar with this issue…
Say we have these variables and are using them in an Expression variable.
If we select C and hit the group icon, we add C to the group and our calculations still work.
If A and B are moved into the group, we get an error because moving them into the group changes their names.
To get this to work, you would have to use the full name of the variable, which I agree seems sort of odd.
Or you would have to use an expression and redefine the variables local to the expression.
The solution would be to allow local variables in the group. To change the way these variables work we have to deal with what happens if we have another A and B in our list of variables that are not in the group. Would the local A and B be looked for first, and only if they don’t exist does the program use variables out of the group? This is probably something we can do, as this is similar to how the column variables work.
This may be more detail than you needed but we will continue to work on a better solution for the next release!
But to be candid:
a) I had trouble following your rationales, even after reading 3 times (likely due to the fact that I don’t understand the underlying mechanics of your program);
b) I couldn’t tell if your rationales had to do with my problem, which is, to restate: that it seems inconsistent that a Global Variable, used in multiple other places, should “BREAK” just because I’ve moved it into a Group in its definition list. This seems inconsistent with it being a Global Variable.
So…can I take it from your answer that you’re agreeing with “b)”? 🙂
Sorry, maybe getting too deep into the details!
Currently, grouping variables changes the variable names. Sometimes that is useful. For example, here would be a case where you have two experiments with different Temp and Time.
Using the groups, results in four uniquely named global variables:
This is useful for organizing, but it can be a problem if you have an existing variable that you move into a group. By moving it into the group, you change its name, as the group name is appended to the variable name in the text box. That is a problem if you have already referred to that variable in other places.
If you could place a variable in a group, but had the option not to include the group name in the name of the variable, I think that would solve your problem.
I understand more now; enough at least to ask questions. 🙂
1. From your example, it looks like the prefix “Exp:” doesn’t get added in the group box itself? We only need to add that when the variable is used in other places, to get it to function? True?
2. And you’re saying this only happens if I move things into a group? But it doesn’t happen if I make the group and define the variables by adding variable definitions inside the group? In that case the prefix isn’t necessary?
Or do I misunderstand both things, and
a) the prefix is always necessary and
b) it will show up in the group also.
I think it is described more by the “a” and “b”.
The way it currently works, the prefix (group name) is always needed to refer to a variable in a group, even when you are in that same group. It does not matter if the variable was created in the group, or created out of the group and dragged into the group.
It will always be “group:variable“.
Does that help?
I think so. Best I work with it now and see it in action.
Gl2 years, 9 months ago jordanParticipant
I think that the confusing part about this behavior is that the variable name changes in the background but is not explicitly made known to the user. If this behavior is maintained, I think that the name presented in the global variable interface be updated to show the true variable name.
Aha. Thanks jordan. I was wondering if this was true from the moderator’s example.
If so, I agree, that showing the actual name will be necessary at least.
Otherwise how is the user to figure out to put the group name on the variable out where it’s used in the graphs, except by coming here and pestering VDT? 🙂
Gl2 years, 9 months ago jordanParticipant
I believe that this behavior is in the help documentation, and I know that the behavior that is the same for specifying columns in the definition table is spelled out in the users manual, but a visual indication of how to call the variable would be more clear I think.
You must be logged in to reply to this topic.