Data Master and Variables

Anton Tandiono shared this question 6 years ago
Answered

1. Why is it that when I create a data master, a same named variable is created as well?


2. Why is it when I change the name of my data master a new variable is created with the new name and the old variable name remains?


3. What would happen, if I delete the old variable name? Would there be any unwanted side-effects?


4. Is this behaviour intended? or is it a bug?


Thanks.

Comments (12)

photo
1

1 -> Just because it's handy, it's just a common variable like the others.


2 -> It's a bug, well, it's more like an unexpected behavior.


3 -> Nothing, they are like the other variables.

photo
1

So just to be sure:


Assuming I created a data master called "Accounts" and used the corresponding created "Accounts" variable somewhere in my prototype and later changed the name of the data master to "dm_Accounts" -which implicitly creates the "dm_Accounts" variable-.


Can I then delete the old "Accounts" variable and be sure that my prototype works as before?

photo
1

Well, if you used the variable Accounts somewhere, once deleted the place you use it will not work until you replace it by something else

photo
1

Hmm. I was afraid of that.


If a data master is made accessible as a variable, then I would have expected that changing the data master name would have lead to the change of it's corresponding variable name.


It's all a bit confusing to be honest. I know a bit to program, and I'm sure this would be a lot more confusing to the rest. I'd strongly recommend you guys have a look at this and come up with a clear concept that your users would understand.


I'm cleaning up my prototype and prefixing screens, data masters, variables, etc ... with "sc_", "dm_", "va_" so that I can easily search them through the find box, since there is no filtering mechanism on the panels. My prototype is getting so large, that I have to organize it this way.

photo
1

On a side note. I've changed the variable name of "Account" to "dm_Account" and then changed the data master name to "dm_Account". No extra variable was created. Though I don't know what the effects would be. I'm a bit worried to change my prototype now, not knowing if my prototype will still work after my changes.

photo
1

Ok, we'll think about it.

photo
1

It should work. The only bug is the one that creates an extra variable when you change the name of the data master.

photo
1

Is the auto-created variable in any way linked / associated to the same named data master? Or do they simply -coincidentally- share the same name?


Is there any way to see if the variable is "linked" or used in the prototype?


(I want to delete variables and data masters that aren't used in the prototype)

photo
1

They just have the same name but they are not connected to each other. I'm afraid there's no way to see where a variable is being used.

photo
1

I'd personally stop the auto-creation of variables if there's not an absolutely good reason to do so. It just bloats the prototype. My 2 cents.

photo
1

Yes, I think they confuse more than they help

photo
1

Solved in Prototyper 4.6 release