It's all about the answers!

Ask a question

How can I convert literal enumeration values into their text values?


Andrew Trobec (49713144139) | asked Sep 25 '12, 6:33 a.m.
Hello!

I am creating a BIRT report for RTC 3.0.1.1 that extracts enumeration values for a given work item.  I have found the table that extracts the right attribute and value (stringExtensions.key and stringExtensions.value), only that the value is the literal value (literal.l1, literal.l2, etc...) instead of the text value.

I have been looking for the table that has a list of the literal values as well as the actual text value but I cannot find it!

Could somebody point me in the right direction?

Thank you in advance!

Best regards,

Andrew

One answer



permanent link
Clement Liu (1.5k54349) | answered Sep 25 '12, 10:00 a.m.
This is how:

Create a dataset and point it to the ENUMERATIONS table

And in the onFetch function of the dataset, construct a array like this: projects[row["LITERAL_ID"]] = row["LITERAL_NAME"];

And finally, in your dataset with the literal values, use the array to cast the values to real names. 

Comments
Andrew Trobec commented Sep 26 '12, 9:09 a.m.

Thanks for the screenshots! I have followed the instructions, but I'm not quite sure what you mean by "use the array to cast the values to real names". Are you saying that I need to create a computed column and somehow access the array?


Clement Liu commented Sep 26 '12, 9:46 a.m.

Something like this:

row["PROJECT_NAME"] = projects[row["PROJECT_LITERAL"]];

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.