Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get values of enumeration list on calculated value javascript?

 Hi 
I'm using a calculated javascript that uses an array inside that contains some days.
The array is filled (hard coded) inside the script, but I would like to use a enumeration list to fill  that array with the values.

Can it be done?

Thanks

0 votes



One answer

Permanent link
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

0 votes

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.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Nov 18 '15, 11:53 a.m.

Question was seen: 2,254 times

Last updated: Nov 19 '15, 11:51 p.m.

Confirmation Cancel Confirm