How do I use the email address from a role in an RTC field?
RTC version = 4.0.2
I have a field called Requestor, type of Contributor, and it uses the "Client User" role as it's value set. I have a drop-down field on the page called Requestor and would like to display the email address associated with the user selected from the list.
Is there a way to reference that and if so, how is it done?
One answer
Since you can't access more than the name an UID in attributes of type contributor (see See https://jazz.net/library/article/1093 Lab 5 for the limitations of JavaScript and what you can do. ) using JavaScript. Java Script based attribute customization is out of the picture.
You could try to create a java based calculated value for this kind of requirement. http://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ shows some examples that you could start with. If you can get the contributor from an attribute or the work item, you could use the IContributor.getEmailAddress() API to access and return that data.
You could try to create a java based calculated value for this kind of requirement. http://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ shows some examples that you could start with. If you can get the contributor from an attribute or the work item, you could use the IContributor.getEmailAddress() API to access and return that data.
Comments
Millard Ellingsworth
FORUM ADMINISTRATOR / JAZZ DEVELOPER Sep 27 '13, 5:24 p.m.Jia Jia Li
Sep 28 '13, 6:55 a.m.Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Sep 30 '13, 7:47 a.m.Millard Ellingsworth
FORUM ADMINISTRATOR / JAZZ DEVELOPER Sep 30 '13, 12:11 p.m.