Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi,
Someone can help me on this. I will appreciate it. I want to query two type objects using webject. I found the article CS195365 from PTC support, which has an example:
<%@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>
<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="type" data="wt.epm.EPMDocument"/>
<ie:param name="type" data="wt.doc.WTDocument"/>
<ie:param name="ATTRIBUTE_TYPE_CONTEXT" data="wt.fc.Persistable"/>
<ie:param name="where" data="(containerName='<CONTEXT_NAME_HERE>')"/>
<ie:param name="attribute" data="number,name,version,lifeCycleState" delim=","/>
<ie:param name="group_out" data="objectsSearched"/>
</ie:webject>
But I tried it. I got the error.
Here is my code;
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="INSTANCE" data="localdomain.vm-windchill.Windchill"/>
<ie:param name="authorization" data="$(@SERVER[]AUTHORIZATION[0])"/>
<ie:param name="type" data="wt.part.WTPart"/>
<ie:param name="type" data="wt.doc.WTDocument"/>
<ie:param name="where" data="(number='$(@FORM[]number[0])')"/>
<ie:param name="attribute" data="name,number,version,lifeCycleState,checkoutInfo.state,containerName,type,obid,containerID" delim=","/>
<ie:param name="group_out" data="objectsSearched"/>
</ie:webject>
<ie:webject name="Sort-Group" type="GRP">
<ie:param name="GROUP_IN" data="objectsSearched"/>
<ie:param name="SORTBY" data="name"/>
<ie:param name="GROUP_OUT" data="objectsSearched"/>
</ie:webject>
Here is the error I got:
javax.servlet.ServletException: com.infoengine.util.IEException: Query-Objects: Parameter "TYPE" may only be specified 1 times.
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:908)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)
at org.apache.jsp.infoengine.jsp.ext.queryDrawingByDrawingNumber_jsp._jspService(queryDrawingByDrawingNumber_jsp.java:154)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
Thank you so much!
Solved! Go to Solution.
CS195365 uses webject "Search-Objects" whereas you are using "Query-Objects"
CS195365 uses webject "Search-Objects" whereas you are using "Query-Objects"
Thank you! I thought they were the same way. Thanks again!