Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Version: Windchill 12.0
Use Case: i was using allversionsfrom(Versioned versioned) to fetch the all versions as to first record version. But for alphabetic version like AA AB im not getting the previous version, please assist
Description:
i was using allversionsfrom(Versioned versioned) to fetch the all versions as to first record version. But for alphabetic version like AA AB im not getting the previous version, please assist
Hi @ashiq_097
Please share what configuration do you use for the versioning schema.
What do you expect and what you get. for example, I want the previous version from AB and I do not get AA please describe it more widely
How the code is written? It could help to test it and help you.
PetrH
hi @HelesicPetr thanks for your response.. we have revision as Double Alphabetic characters as i was trying to use below snippet code to extract the previous released revision details but I'm getting only AB Version in the result.. please assist
Hi @ashiq_097
The method VersionControlHelper.service.allVersionsFrom(object); returns just the latest objects of all revisions.
So this method can not be used to get non latest version.
if you want to get non latest version then you have to use following method.
QueryResult allVersions = VersionControlHelper.service.allIterationsOf(object.getMaster());
PetrH
hi @HelesicPetr , I wanted to pull the latest object details but using the method allVersionsFrom i was getting empty data for the previous revision on this Double Alphabetic version details as pasted the screenshot above. I Accept this method is pulling correct data for single alphabetic , numeric versions. only issue is with double alphabetic is not pulling the correct details as needed. please assist
using alliterationsof will be moving pulling non-latest objects which has other views like manufacturing , but i want to return only engineering view part details , is that possible to fetch it ?
Hi @ashiq_097
You have to filter the result by your own conditions
Or you can use qyery definition and search method where you can define own conditions.
PetrH
is there any API to Pull this versions as well ?
Hello @ashiq_097,
It looks like you have some responses from a community member. If any of these replies helped to answer your question please mark the appropriate reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Vivek N.
Community Moderation Team.