cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Include segment information in query or report about nodes

crunge
3-Newcomer

Include segment information in query or report about nodes

I would like to create a query or a report that searches for some criteria of Requirements. So, for example, I might want a list of all requirements in Draft state. In the returned query/report, I do not want to see requirements in any other state, but I do want to show information about the document where the Requirement is contained. I would like to include information about the Document Title and the Document Owner.

While the Requirement type includes the Document ID, I have not found an easy way to extract this information to show the Document Owner. I tried to use a computed field on the report, but the Document Owner is a User field and is not allowed to be used in computed fields. For other relationships fields (such as Contains), this information is easy to retrieve. However, many requirements are in subsections of the document and this restricts the ability to create a good report.

Does anyone have any recommendations?

4 REPLIES 4

Hi Christina,

We don't currently use the document module (so I am not 100% sure if this will work), but you could try creating a "Field Value Attribute" type field. What the FVA does is act as a pointer on one item to a field on another item by jumping across a Relationship or IBPL field.

Its a bit hard to explain, so here is the text from the Server Administration guide:

If an item is related to another item through a single-valued relationship field or IBPL field, you can

share information from the related item in an FVA field. For example, if Department items have a

Manager field and a Phone Extension field, and Department items can be related to Defect items

through a Manager IBPL field on the Defect, you can also create an FVA field on the Defect named

Extension to Call that displays the phone number for the selected department manager. If you change

the Phone Extension in the Department item, that change is reflected in the Defect item.

What you may be able to do is make an FVA field on the Requirement type which holds some value from a field on the Segment and then use that FVA field in your queries/reports.

Please let me know if that works for you.

Matt

Matt,

I don't think the FVA field will work because there isn't a relationship field that always connects the document to the items in the document. I don't think I can cascade FVA fields through several layers of a relationship (from Requirement Document to Requirement to Requirement).

Christina

mrump
16-Pearl
(To:crunge)

Hi Christina,

You say your Query gives you the requirement you want to see and the these requirements contain a DocumentID (which not necessarily is a directly related Item).

Am I right so far?

Have you tried the following in a report ?

....
<%begindetail%>

<table>
<tr>

<!-- show the requirement Items fields -->

<%iteratefields%>

<td >&fieldname</td>

<%/iteratefields%>

<!-- fetch the segment item by its given ID to show the related requirement document Item fields -->
<%beginrelationshipsdetail Query[( (field[ID] = "<%DocumentID%>") )]%>
<td ><%Relationship Type%></td>
<td ><%Relationship ID%></td>
<td ><%Relationship Summary%></td>
<td ><%Relationship State%></td>
<%endrelationshipsdetail%>

<tr>
</table>

<%enddetail%>

....

It opens a "inline query" in the report and should give you all the information you need.

Note:

The performance of this kind of reports might be a problem, so please start with a small result set for testing.

HTH Matthias

crunge
3-Newcomer
(To:crunge)

Thanks, this was very helpful.

Announcements


Top Tags