Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi Everyone,
If I query a part(using Info engine Query-Objects webject) on number field, then i get all the revisions of the object but I want to query only the latest version.
Could someone help me out on this.
Regards
Sudeep Pai
Solved! Go to Solution.
Hello Sudeep,
You can use below 'Search-Objects' webject for this purpose. Just replace partNumber attribute value in below task according to your data set.
<%@page language="java"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
<!-- get wtproperties -->
<ie:webject name="Get-Properties" type="MGT">
<ie:param name="ATTRIBUTE" data="wt.federation.ie.VMName"/>
<ie:param name="GROUP_OUT" data="properties"/>
</ie:webject>
<%
String partNumber = "RAM";
%>
<ie:webject name="Search-Objects" type="OBJ">
<ie:param name="INSTANCE" data="$(properties[0]wt.federation.ie.VMName[0])"/>
<ie:param name="authorization" data="$(@SERVER[]AUTHORIZATION[0])"/>
<ie:param name="type" data="wt.part.WTPart"/>
<ie:param name="WHERE" data="(number='<%=partNumber%>')"/ >
<ie:param name="attribute" data="number,name,version,lifeCycleState" delim=","/ >
<ie:param name="VERSION" data="LATEST"/>
<ie:param name="ITERATION" data="LATEST"/>
<ie:param name="group_out" data="objectsSearched"/>
</ie:webject>
Please, let me know if you need more information.
Hello Sudeep,
You can use below 'Search-Objects' webject for this purpose. Just replace partNumber attribute value in below task according to your data set.
<%@page language="java"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
<!-- get wtproperties -->
<ie:webject name="Get-Properties" type="MGT">
<ie:param name="ATTRIBUTE" data="wt.federation.ie.VMName"/>
<ie:param name="GROUP_OUT" data="properties"/>
</ie:webject>
<%
String partNumber = "RAM";
%>
<ie:webject name="Search-Objects" type="OBJ">
<ie:param name="INSTANCE" data="$(properties[0]wt.federation.ie.VMName[0])"/>
<ie:param name="authorization" data="$(@SERVER[]AUTHORIZATION[0])"/>
<ie:param name="type" data="wt.part.WTPart"/>
<ie:param name="WHERE" data="(number='<%=partNumber%>')"/ >
<ie:param name="attribute" data="number,name,version,lifeCycleState" delim=","/ >
<ie:param name="VERSION" data="LATEST"/>
<ie:param name="ITERATION" data="LATEST"/>
<ie:param name="group_out" data="objectsSearched"/>
</ie:webject>
Please, let me know if you need more information.
Thanks a lot!!!