Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

I can not get the values of Artifact attributes

 Hello , 


I'm working on a basic script that displays the Name and the type of the selected artifact ;
but I did not get any displayed value.
I tried to customize it and what i get as the return value is "undefined" 

here is my code : 

function onselection(selected)
{
if(selected.length == 1)
{
prompt("entred","1");
RM.Data.getAttributes(selected,RM.Data.Attributes.Name, function(result) 
{
document.getElementById("attributes").innerHTML="Artifact Name : " + result[RM.Data.Attributes.NAME];
});
}else document.getElementById("attributes").innerHTML="failed";

}

RM.Event.subscribe(RM.Event.ARTIFACT_SELECTED, onselection); 


0 votes

Comments

Here are more details about what I am trying to do :


After I selecte an Artifact inside or outside a Module, I want to display the Type of this Artifact and Its name.



One answer

Permanent link

What are you trying to do? Your code makes no sense to me.

I suggest you take a good read of the official documentation and samples.
https://jazz.net/wiki/bin/view/Main/RMExtensionsMain

Once you're comfortable with those samples, you can then start writing your own codes.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Mar 16 '17, 1:17 p.m.

Question was seen: 1,903 times

Last updated: Mar 27 '17, 7:20 p.m.

Confirmation Cancel Confirm