Skip to main content
22-Sapphire I
February 2, 2017
Solved

New qml report - find latest at one of listed states

  • February 2, 2017
  • 2 replies
  • 4350 views

I was asked to provide a report of the latest version of all drawings at either Released or Prototype Released.

Search allows you to do this because the logic applied is:

- (Filter out anything by state / context that you don't have READ access to)

- Filter out non-latest iteration each Revision (hard-coded in search)

- Use any State criteria; filter out any not any those state(s)

- Depending on preference, return latest of what remains or all (default - latest)

For this data you get B.2 Released as required - essentially search allows you to apply a config spec including state to CAD Doc's (or other)

A.1 In Work

A.2 Prototype Released

B.1 In Work

B.2 Released

C.1 In Work

But, Creating a query builder report to apply the logic in this same sequence turned out to be tricky.  By default the qml logic is:

- Filter out non-latest iteration each Revision (direct criteria)

- Find latest using standard sub select on branch id

- Then, apply any State criteria

If you filter out for example In Work, it returns nothing for the data above.

Kudos to tech support engr Jaysel Meledath at PTC who kept with this and figured it out using the appropriate sub select.  Seems like it might be helpful to others - leaving it to PTC to make available.

Best answer by ocorten-2

Got it working by adding an extra criteria for State = RELEASED in the sub-select for the maximum Version Sort id

2 replies

1-Visitor
April 23, 2018

Can you share the QML of this report?  Or screen shots?

Marco Tosin
21-Topaz I
21-Topaz I
April 24, 2018

You can find lots of report ready to use in this document https://community.ptc.com/t5/Windchill-Questions/Resource-for-reporting/td-p/448738

 

Marco
1-Visitor
April 24, 2018

Except I'm still not finding what I'm looking for.  I need to report that Latest Released Revision of a WTPart.  There may be multiple Revisions of this part that are Released and the Latest Revision, regardless of State, may be In Work.  For example:

 

PART12345  Rev. A.1  Released

PART12345  Rev. B.1  Released

PART12345  Rev. C.1  In Work

 

I want the report to send back the Latest Released Revision, which in this case is Only PART12345 Rev. B.1

 

The QML examples I tested came back with Blank results because the Latest, PART12345  Rev. C.1, is NOT Released.

12-Amethyst
November 21, 2022

Hi Mike,

 

I am running into this same issue.

 

Reading the final lines it looks like Tech Support (Jaysel Meledath) supplied you with the correct sub-select to get this done.

Can you share it here as well?

ocorten-212-AmethystAnswer
12-Amethyst
November 21, 2022

Got it working by adding an extra criteria for State = RELEASED in the sub-select for the maximum Version Sort id

12-Amethyst
June 19, 2025

Hello ,

 

I applied the same query , i get result as expected.

but..

for few data the result is not expected its giving me the WIP data  as the latest one , it should give previous released data.

 

any help on this issue will be appreciated.

 

-

Nimish