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.