It's all about the answers!

Ask a question

How do you extract Primary Text from DNG Artifact when looping through a collection


Ben Sharples (813060) | asked Jun 28 '16, 6:14 p.m.
I've got a Test Plan in RQM that is associated with a collection that when exporting with RPE I want to display a table of the requirements in the collection. I want to pull out the Primary Text as well as custom attribute I've defined that holds my customer Requirement ID (called RID), but not the title of the artifact.

Currently I don't seem able to extract the Primary Text

My RPE Snippet below


For _DNGCollection uri configuration is: href.replace("resources/","/publish/resources?resourceURI=")
For _DNGText uri configuration is: relation.replace("resources/","/publish/resources?resourceURI=")

If I look at the RPE console and manually enter the resource url into my browser which returns the XML reporting URL (https://greygloom.outer.stellar.local:9443/rm/publish/resources?resourceURI=_hSp0Btk6EeS5W6Hvos8Ijw.), what I notice is the 'content' node is missing.

If I'm tracing from a Test Case to Requirement in DNG I have no problems at all

Accepted answer


permanent link
Subramanya Prasad Pilar (4.6k16) | answered Jun 29 '16, 3:57 a.m.
Are you using data source schema for artifact type "text" or "resources"? For text data source, you can use
relation.replace("resources/","publish/text?resourceURI=");

Also, I suggest using href.replace("resources/","publish/resources?collectionURI=") to configure _DNGCollection.
Ben Sharples selected this answer as the correct answer

One other answer



permanent link
David Clark (2341151) | answered Jun 29 '16, 8:13 a.m.
 There are excellent tutorials on youtube to view by Jorge Garcia.
Are you trying to get the "Name" or the "Content"
  • For the content of an collection or module artifact, you create a data source of "text" in the Data Source View in RPE.
  • This data source will then show up in the Document Specification - although you can hid it and make the security verification match the "resources" Data Source.
  • You will want to create a Data Source Configuration item within a container and then modify the URI to be: about.replace("/resources/","/publish/text?resourceURI=");
  • Create a container with the new Data Source and use that. This will iterate over the collection of artifacts and pull the data you need.
    • Use "dataSource/artifact/moduleContext/contextBinding/title" to get the content.
  • For the custom attribute "RID" - you will need
    • container: dataSource/artifact/collaboration
      • container: dataSource/artifact/collaboration/attributes/objectType/customAttribute
        • query on "name == RID" 

Your answer


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