It's all about the answers!

Ask a question

javascript for enumerations

Luis Quiroga (1112) | asked Aug 17 '12, 9:28 a.m.
edited Mar 21 '13, 12:16 p.m. by Ralph Schoon (63.1k33646)


I am trying to grab the contents from an enumeration and copy it into another field using workitem.getvalue("enumerationID"); but instead of getting the actual value of the field, I get the literal ID of the item in the enumeration.

Is there a way for me to get the actual value rather than the literal ID of the items in an enumeration?


2 answers

permanent link
Ralph Schoon (63.1k33646) | answered Aug 20 '12, 3:28 a.m.
Hi Luis,

if you are talking about attribute customization I can't provide you with an answer. The support for all not string based types is still very limited. I have not been able to set certain attribute types such as contributor types. You might have to create a translation table for the enumeration literals. Since you would have to maintain it in several places I would consider not using attributeCustomization in this case.

I am not really sure what you try to achieve, but in general the Java API provides more complete capabilities that can be used in advisors and participants (precondition/followup action). If you are looking for an answer for the Java API, you should be able to find some hints here:

Nicolás Rodríguez commented Oct 03 '13, 2:08 p.m.

Hi Ralph!

Do you know if there is way to get enumeration label by attribute customization in 4.0.1?

Tnks for your help!

permanent link
Ralph Schoon (63.1k33646) | answered Mar 21 '13, 12:16 p.m.
You can access the Enumeration using workItem.getValue("enumerationID") and workItem.getLabel("enumerationID") provides you with its label/displayname at least in RTC 4.x. See Lab 5 for details.

Your answer

Register or 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.