javascript for enumerations
![]()
Luis Quiroga (11●1●2)
| asked Aug 17 '12, 9:28 a.m.
edited Mar 21 '13, 12:16 p.m. by Ralph Schoon (63.3k●3●36●46) Hi,
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? thanks! |
2 answers
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Aug 20 '12, 3:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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: http://rsjazz.wordpress.com/2012/08/20/manipulationg-work-item-enumeration-values/. Comments Hi Ralph!
|
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Mar 21 '13, 12:16 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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 https://jazz.net/library/article/1093 Lab 5 for details.
|
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.