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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Query latest revision of the part using Info engine

spai-2
12-Amethyst

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

ACCEPTED SOLUTION

Accepted Solutions
Prabhash
12-Amethyst
(To:spai-2)

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
Prabhash
12-Amethyst
(To:spai-2)

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.

spai-2
12-Amethyst
(To:Prabhash)

Thanks a lot!!!

Announcements


Top Tags