Skip to main content
4-Participant
March 9, 2026
Question

Query Builder: How to Fetch Attributes from Multiple Part Subtypes in One Report?

  • March 9, 2026
  • 2 replies
  • 123 views

Version: Windchill 13.1

 

Use Case: I’m trying to create a Query Builder report in Windchill that retrieves data from multiple Part subtypes, where each subtype requires different attributes to be included in the result set. For example: From part type PART_A, I need to fetch a custom attribute ATTR_A From part type PART_B, I need to fetch a different custom attribute ATTR_B Is it possible to achieve this in a single Query Builder report? If so, what is the recommended approach to configure the criteria and result columns for multiple part types with different attribute sets?


Description:

I’m trying to create a Query Builder report in Windchill that retrieves data from multiple Part subtypes, where each subtype requires different attributes to be included in the result set.

For example:

  • From part type PART_A, I need to fetch a custom attribute ATTR_A
  • From part type PART_B, I need to fetch a different custom attribute ATTR_B

Is it possible to achieve this in a single Query Builder report? If so, what is the recommended approach to configure the criteria and result columns for multiple part types with different attribute sets?

2 replies

avillanueva
23-Emerald I
23-Emerald I
March 10, 2026

Add the Part object to the report twice, one for each subtype. You can also use a technique to export the QML and make a union. In this case, you would have to different QML reports. export each, edit offline to make a union and reimport back in. But there is no editting online of that merged QML. 

https://community.ptc.com/t5/Windchill/TIL-two-things-about-union-queries-in-Query-Builder-I-thought-I/m-p/626642

 

16-Pearl
March 10, 2026

It depends on what the other criteria of the query are, the following has worked for me in some cases. 

 

Make outside joins against the part subtypes to master reference.

 

2026-03-10_113255.jpg

 

2026-03-10_115254.jpg

 

Probably best to make a separate report for each type and union them, although I think there's a limit of 2 or 3 unions in a query builder template.