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.
|
One answer
Hello
Have you tried looking at the sample, ModuleExplorer?
It might display primary text, I am not sure.
Comments
Anas Musharraf
commented Jun 06 '18, 11:13 a.m.
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; } }); });
Anas Musharraf
commented Jun 06 '18, 11:13 a.m.
error is:
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
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.