Start a topic
With the exception of Windchill, The PTC Community is on read-only status until April 6 in preparation for moving our community to a new platform. Learn more here
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The PTC Community is on temporary read only status in preparation for moving our community to a new platform. Learn more here

Translate the entire conversation x

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

SM_14482211
4-Participant

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

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 2

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

 

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.

Announcements


Top Tags