Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hello,
I have created a query within Query Builder that allows me to put a begin date and end date and for the period, the search results will show me WTParts. There is one problem, however. The search results should only return the latest version of a part.
Rather than the search results show A.1, A.2, A.3, B.1, and B.2; the search results shouldy on show B.2 of that part because it is the latest version.
Does anyone know how to accomplish this using the attributes available within the Query Builder interface or is this something that is going to require some custom code?
Thank in advance for any insight you may be able to provide.
The only thing I see in the Part (wt.part.WTPart) class is the "Latest Iteration" attribute. I do not see just a "Latest" attribute. Could you describe in more detail whether or not the "Latest" attribute that you are telling me about is available in this class or another class?
Thanks in advance.
Most of our part reports require to list only the part(s) with latest iteration on its latest revision.
I haven't found a better way to find latest revision than listing the part with the maximum value of versionSortID against the same master.
I have attached my sample report on how we query it currently. I would like to see if other users have better way to achieve this goal. Thanks.
In Reply to Brian Beard:
Please disregard the extra "0001 |A.4" at the bottom of my last reply. That was a mistake.
That solutionlooks better than mine.
I was doing a NOT EXISTS other where other.versionSortID>current.versionSortID
I guess I'm going to use the maximum function in the future.
Thanks,
In Reply to Liu Liang:
Most of our part reports require to list only the part(s) with latest iteration on its latest revision.
I haven't found a better way to find latest revision than listing the part with the maximum value of versionSortID against the same master.
I have attached my sample report on how we query it currently. I would like to see if other users have better way to achieve this goal. Thanks.
In Reply to Brian Beard:Please disregard the extra "0001 |A.4" at the bottom of my last reply. That was a mistake.
For the future, here is some information if anyone runs into the situation we have. Since the Design view of parts in classified and not our other views, we needed to show the latest version whereview = "Design". I built upon the query that was posted so I came up with something like this that returns the latest version of the design view of a part.
<u>Criteria</u>:
Part (wt.part.WTPart).versionInfo.identifier.versionSortId
IN
Sub-select
<u>Sub-select</u>:
- From:
- Join:
- Select:
- Criteria: