Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
I like to get the result back from Info*Engine for all WTParts that are in the status RELEASED or in ENGINEERING. Can I pass multiple values for "lifecycle", how must these be separated ?
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="INSTANCE" data="${FORM[]instance[]}"/>
<ie:param name="type" data="wt.part.WTPart"/>
<ie:param name="where" data="lifeCycleState ='${FORM[]lifeycle[]}'"/>
<ie:param name="where" data="latestIteration ='true'"/>
<ie:param name="where" data="number='${FORM[]number[]}'"/>
<ie:param name="group_out" data="queryAll"/>
</ie:webject>
<ie:webject name="Sort-Group" type="GRP">
<ie:param name="GROUP_IN" data="queryAll"/>
<ie:param name="GROUP_OUT" data="${FORM[]ename[]}"/>
<ie:param name="SORTBY" data="NAME"/>
<ie:param name="SORTED" data="ASC"/>
</ie:webject>
Solved! Go to Solution.
Here is a extract from I*E documentation regarding the Where Clause:
Where Clause:
The Query-Object webject has the parameter of WHERE, which can take some specific conditions.
• All objects
– The WHERE parameter has a special syntax for returning all objects – open parenthesis and close parenthesis “()”:
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="INSTANCE" data="domaim.domainname.servername.Windchill"/>
<ie:param name="ATTRIBUTE" data="number,name" delim=","/>
<ie:param name="TYPE" data="wt.part.WTPart"/>
<ie:param name="WHERE" data="()"/>
<ie:param name="GROUP_OUT" data="parts"/>
</ie:webject>
• Wild card
– Both left-hand matching and right-hand matching can be used as a wild card in WHERE parameter.
<ie:paramname="WHERE" data=“name=*engine*”/>
• AND/OR
– Some conditions can be connected with ‘&’ and ‘|’.
<ie:param name="WHERE" data=“name=*body&name!=*engine*”/>
<ie:param name="WHERE" data=“name=*body|name=*engine*”/>
Refer to the “Specifying the TYPE and WHERE Parameters” topic under Advanced Customization->Windchill Adapter->Using Windchill Adapter Webjects in Windchill Help
Center.
Regards,
PASI Team
Can you try following and check if that helps
<%
string clause= "(lifeCycleState='INWORK')|(lifeCycleState='RELEASED')";
%>
<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>
<ie:webject name="Search-Objects" type="OBJ">
<ie:param name="INSTANCE" data="$(properties[0]wt.federation.ie.VMName[0])"/>
<ie:param name="TYPE" data="wt.part.WTPart"/>
<ie:param name="ATTRIBUTE" data="name,number,lifeCycleState" delim=","/>
<ie:param name="WHERE" data="<%=clause%>"/>
<ie:param name="LATEST" data="true"/>
<ie:param name="GROUP_OUT" data="test1"/>
</ie:webject>
Regards,
Bhushan
Here is a extract from I*E documentation regarding the Where Clause:
Where Clause:
The Query-Object webject has the parameter of WHERE, which can take some specific conditions.
• All objects
– The WHERE parameter has a special syntax for returning all objects – open parenthesis and close parenthesis “()”:
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="INSTANCE" data="domaim.domainname.servername.Windchill"/>
<ie:param name="ATTRIBUTE" data="number,name" delim=","/>
<ie:param name="TYPE" data="wt.part.WTPart"/>
<ie:param name="WHERE" data="()"/>
<ie:param name="GROUP_OUT" data="parts"/>
</ie:webject>
• Wild card
– Both left-hand matching and right-hand matching can be used as a wild card in WHERE parameter.
<ie:paramname="WHERE" data=“name=*engine*”/>
• AND/OR
– Some conditions can be connected with ‘&’ and ‘|’.
<ie:param name="WHERE" data=“name=*body&name!=*engine*”/>
<ie:param name="WHERE" data=“name=*body|name=*engine*”/>
Refer to the “Specifying the TYPE and WHERE Parameters” topic under Advanced Customization->Windchill Adapter->Using Windchill Adapter Webjects in Windchill Help
Center.
Regards,
PASI Team
Thank you !