It's all about the answers!

Ask a question

How to get literal ID from literal name?


Franca Zober (1513) | asked Sep 24 '19, 10:43 a.m.

Hi


for a specific enumeration where I have the literal name / label, how can I find the associated literal ID using javascript?

Regards
Franca


Comments
Franca Zober commented Sep 25 '19, 4:08 a.m.

So I understand I have to browse through the enumeration to find the ID associated with the label I have. But how to I address the enumeration of categories used for filed_against in the API? What is the name of that enumeration? 

One answer



permanent link
Ralph Schoon (63.4k33646) | answered Sep 25 '19, 6:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 25 '19, 6:05 a.m.

 I am not aware of a way to access the enumerations or the category values. I usually know the ID's and values I want in the script.


As far as I can tell, you can however set the category of a work item. Not sure what the format is. I found my AttributeValueAnalyzer from the process enactment workshop very useful as it allows to look at the values. The category is in the Filed against attribute. The value to set in a work item is very likely the path that you can see when editing categories in the Admin ui. E.g. "JKE/Banking Logic" from the JKE sample.

Use the AttributeValueAnalyzer or use console.log to output getValue() and getLabel() values if in doubt.

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.