Every time you want to reference a global variable in code you have to first bind it to an input. Why? Please end this.
Can you be more specific? Global Variable for what?
euh…?
@josecgomez in order to use the value of a global variable in the product configurator* you have to first associate the global variable to an input. Then you can reference the input value… at least that is what we have experienced.
Is that not true? You would make my day for the second time if you told me we could reference them without assigning them to an input.
I think there are Global Input Variables AND Local Variables. The former needs to be bound to an input but the latter should be available from the Expression Tree. The Local variables are available to the whole configurator but the Global Input Variables can be passed to sub-configurators if I recall correctly.
Exactly, I need to use Global variables in sub configurators but in order to do that I have to waste time and add as many inputs in each subconfigurator as the number of global variable required in the sub configurator. Why?
Sorry for the vagueness.
Ah, OK. I think it’s because Global Inputs are bi-directional. If you change it in a sub, it will pass to all others. If it wasn’t bound, you’d run the risk of not passing it back. That’s my guess of the design decision to bind.
Having a Global Variable that’s not bound might be interesting but I wonder about possible side effects.
What I’d REALLY like to see are UD Methods that are global across configurators. DRY = Don’t Repeat Yourself!
Mark W.
That is fine if it is bi-directional, but I still don’t see why having an input decreases the risk of it not being passed back. You should be able to at least reference them without an input. I agree with you about the global UD methods across all configurators.
Let’s say I pass the value to a field. That field is changed by a calculation in the sub-configurator. If not bound, how would the other configurators know the global value had changed unless you remembered to assign it back to the global var? I can see lots of support calls…
I still like the idea of an unbound global variable though…
I agree, that there SHOULD be some form of variable that you can create that could be passed without having an Input for that variable… if we could pass something like we have in BPMs where there is a static list of “Character01” type variables that you could set in one place/configurator, and it would be usable in another sub-configurator…
I have also suggested something like this, and have also suggested that these be nameable.
BUT FOR NOW… you just need to create an input for each one that you want to use… what I have seen done is the creation of “invisible” inputs for all the global variables that you intend to use. Then they will get passed and you can use them as desired.
Where is your topic? I will vote for it. Please vote for this one if you agree.
Create an “Enhancement request” through tech support.
Do you have a link to that form? If not I will look it up.
Just a plane old service call through tech support… type in the title “Enhancement request”
Thanks Tim. I’ll have to come find you at insights this year. I came to one of your classes about 3 years ago I think. I think it was a bathroom stall configurator or something of that nature.
Look me up… still not confirmed for going, but I anticipate that I will be presenting on Product Configurators and other Operational functionality. Last year the configurator was a Submarine Sandwich configurator, which seemed to be an understandable example.