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

The PTC Community email address has changed to Learn more.

Windchill Report Management (Query Builder)


Windchill Report Management (Query Builder)

Somebody can tell how I can create a simple query "select max(versionSortIdA2versionInfo) from WTDocument;" in Query Buider?

I'm using Windchill 10.1 M030... The problem is in the MAX function...

Thanks in advance!


Needs to use sub-select - thru a very convoluted set of values. It is unbelievable that this is still required in ordere to get the Latest Revision. I would happily trade 1000 of the recent enhancements to Windchill to instead have a simple "Lastet Revision" pick directly in criteria.

Note: This is recommended by tech support (5 variations of it in 5 tech support calls though); not documented anywhere in the help files.

Sample QML and screen captures available if you like - not sure how to upload a file here.

Mike, thanks for your reply!

To get the latest Iteration is easy...


But in my case I want to get only the latest iteration from the last version...


Tip ->To upload images just click at the "camera" icon... !

I used the Maximum of the Branch Identifier instead of the SortID in a Sub-Select to get the latest iteration of the latest revision, and it seemed to work.

The SortID returned looks like a string to me, and taking the maximum of a string is ambiguous.

I also thought about converting the SortID to a number, but neither have I tried it nor do I know if it is possible.


If you create Windchill report using Query Builder you should join this group Reporting

You should also take a look at this document I wrote Resource for reporting

In it you can find lots of useful information about reporting and many report ready to use (some of them are about reporting the very latest iteration).


Hugo Hinterberger‌,

Thanks for mentioning this.  Are you talking about BRANCHIDITERATIONINFO?  I will start trying your method.

Branch Identifier looks like this in an QML:

<column propertyName="branchIdentifier">iterationInfo.branchId</column>

And here is a screenshot of the attribute selection window:

Windchill Query Builder - Branch Identifier.png

I guess the answer to your question is: "yes".

I've struggled through this also in WC9.1.  Still hard to believe its just as awkward in 11.0.  Myself and other users at my place here are convinced PTC purposely doesn't make easier with the intent you will pay big $ for their consulting and customization services.

I've used query builder extensively for many years now and have complained a fair amount - but I actually LOVE how it works in 11.0.  Just have to learn how things work - very different from before.

It's such a common need - filter results for both latest Iteration (easy) and latest Revision (convoluted and complex).  Seems that by now, this would be a direct selection somehow rather than having to use sub-select.  There are CS articles and other documentation recommending / showing both versionsortinfo and branchindentifier - seems that both return the same results but haven't looked at thoroughly.

I wrote my own document on how to get the latest version so I have the exact steps.  It's 4 1/2 pages.  It's inflated though because I have images to show exactly what it should be.  Without the images it's a little over 1 page.

I created a Product Idea: Provide "Latest Version" in Query Builder

Top Tags