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

Read the primary text of an artifact, RM.Data.getAttributes

I have been struggling to use RM.Data.getAttributes, i dont understand the documentation. I am trying to create a widget which i activate when in a module and in my console  i want to see the primary text.

0 votes



One answer

Permanent link
Hello
Have you tried looking at the sample, ModuleExplorer?
It might display primary text, I am not sure.

0 votes

Comments
Im trying to use a widget to get this can you help me with the following:
RM.Event.subscribe(RM.Event.ARTIFACT_SELECTED, function(module) {
    console.log("--- Test for RM.Data.getContentsStructure ---");
    RM.Data.getContentsAttributes(module[0], [RM.Data.Attributes.PRIMARY_TEXT], function(result){
        if(result.code == RM.OperationResult.OPERATION_OK) {
            result.data.forEach(function(item){
                console.log(item.values[RM.Data.Attributes.NAME]);
            });
        }
        else {
            console.log("RM.OperationResult.OPERATION_KO");
            return;
        }
    });
});

error is:
item.values is undefined

Sorry, I can't help with that part. Someone from development would have to comment.  You could get IBM Services to help with this but that would be at a cost.

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
× 1,220

Question asked: Jun 05 '18, 12:54 p.m.

Question was seen: 2,031 times

Last updated: Jun 06 '18, 11:53 a.m.

Confirmation Cancel Confirm