How to get the custom attributes programatically?
![]()
Hi,
I want to check values of custom attributes for certain conditions. How to get the custom attribute values??? Thanks, Dnyanesh |
Accepted answer
![]()
the problem we have is that you haven't said what kind of program
client server java javascript OLSC ?? here are links to some code in Java for Client and Server (Advisor or Participant) that accesses all the attributes.. client - see the 'accepted answer' here https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes server - see the third post here https://jazz.net/forum/questions/76276/how-to-get-the-value-selected-by-user-from-a-drop-down-list Dnyanesh Markad selected this answer as the correct answer
Comments Hi all ,
I haven't really done this, as I see it there are two options using Java in a server extension.
If you haven't found examples already, here a small introduction on how to get at work item attributes in the Java API. http://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/
|
One other answer
![]()
you could use getValue with attribute id specified within double quotes
sample code: var custAttr = workItem.getValue("custAttrID");hope it helps Comments ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This is of course the syntax if using a script based customization. Since the question fails to give enough context, it is unclear if that is the question. This blog answers this question for the plain java client library and other extensions as well.
Hi,
In deatail, suppose I have one custom attribute as custA. Its type is medium string. In editor presentations I have assigned the attribute values as list. So now I want to get the number of selected attributes in the list programatically.
|