cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Query latest revision of the part using Info engine

SOLVED
Newbie

Query latest revision of the part using Info engine

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Query latest revision of the part using Info engine

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.

View solution in original post

2 REPLIES 2
Highlighted

Re: Query latest revision of the part using Info engine

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.

View solution in original post

Highlighted

Re: Query latest revision of the part using Info engine

Thanks a lot!!!

Announcements