How to get values of enumeration list on calculated value javascript?
One answer
Why the change? I assume that you still have to hard code the values somewhere else, such as the process configuration source, right? If you are using the Eclipse client usually, I just don't see the difference if ever you want to change the values, either in the JavaScript source, or the attribute list (you can do the same in the process configuration source).
Anyway, you can check out the below example - it shows a way to use the "configuration" parameter. As mentioned above, you still have to hard code the values.
https://jazz.net/wiki/bin/view/Main/AttributeCustomizationExamples#Determine_the_value_set_for_an_e
Anyway, you can check out the below example - it shows a way to use the "configuration" parameter. As mentioned above, you still have to hard code the values.
https://jazz.net/wiki/bin/view/Main/AttributeCustomizationExamples#Determine_the_value_set_for_an_e
Comments
Hi Donald
I do not want to hard code the values anymore. Right now I fill my array with something with values inside the script. But if I want to add more values I need to change my script.
What I'm trying to do is get the values from an enumeration an take that to fil the array. So other people (with no knowledge of scripts) can add more values in the enumeration.
That's what I suspect you wanted to do. Note that enumerations are stored in the process configuration, while the attribute customization scripts are not designed to read the process configuration at all. In this case, the script configuration in the aforementioned sample is the only other place you can put the value list. If you want someone else with no knowledge of scripting to change the value list, the process configuration source may not be a better place than the script itself for this purpose.