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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Search-Objects webject based on timestamp

JeffStevenson
2-Guest

Search-Objects webject based on timestamp

I'm trying to get to all of the files modified since a certain date along with the latest revision/iteration. I'm running into inconsistencies between searching based in modifStamp between Search-Objects and Query-Objects.

If I use Query-Objects, I can search based on timeStamp down to the minute or second. However, Query-Objects doesn't allow me to get the latest revision/iteration of an object.

Search-Objects allows me to get the latest revision iteration, however, Search-Objects only seems to search down to the day in the modifyStamp field.

Example:

If I am searching for all files modified since 2012-03-15 01:01:01 with Search-Objects, my results are including all files modified on 2012-03-15 regardless of the hh:mm:ss.

Conversely, Query-Objects gives me all files modified since 1:01:01 on March 15.

I'm trying to build a webject to get around this, but I'm having some trouble. Is this the desired functionality of Search-Objects? It seems as if I should be able to search via a WHERE clause the same in any webject that accepts WHERE as a parameter.

Does anyone have a workaround for this or know what may be causing it? Is this a setting within the search results properties for WC?

I've included my latest webject for your review.

<?xml version="1.0" encoding="UTF-8"?>

<%@page language="java"%>

<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<!-- Task for query Windchill for new and release content since the creation of latest baseline -->

<!-- Task is called by IEListContent.class -->

<ie:webject name="Search-Objects" type="OBJ">

<ie:param name="INSTANCE" data="com.mycompany.Windchill" delim="!" valueSeparator="!" default="<%=com.infoengine.au.NamingService.getVMName()%>"/>

<ie:param name="DBUSER" data="wcadmin"/>

<ie:param name="GROUP_OUT" data="document"/>

<ie:param name="PASSWD" data="password"/>

<ie:param name="TYPE" data="wt.epm.EPMDocument"/>

<ie:param name="WHERE" data="thePersistInfo.modifyStamp>='$(@FORM[]moddate[])'"/>

<ie:param name="WHERE" data="CADName='*.xml'"/>

<ie:param name="VERSION" data="LATEST"/>

<ie:param name="ITERATION" data="LATEST"/>

<ie:param name="ATTRIBUTE" data="*"/>

</ie:webject>

<ie:webject name="Query-Objects" type="OBJ">

<ie:param name="INSTANCE" data="com.mycompany.Windchill" delim="!" valueSeparator="!" default="<%=com.infoengine.au.NamingService.getVMName()%>"/>

<ie:param name="DBUSER" data="wcadmin"/>

<ie:param name="GROUP_IN" data="document"/>

<ie:param name="GROUP_OUT" data="documentx"/>

<ie:param name="PASSWD" data="password"/>

<ie:param name="TYPE" data="wt.epm.EPMDocument"/>

<ie:param name="WHERE" data="thePersistInfo.modifyStamp>='$(@FORM[]moddate[])'"/>

<ie:param name="WHERE" data="CADName='*.xml'"/>

<ie:param name="ATTRIBUTE" data="*"/>

</ie:webject>

<ie:webject name="Query-Tree" type="OBJ">

<ie:param name="INSTANCE" data="com.mycompany.Windchill" delim="!" valueSeparator="!" default="<%=com.infoengine.au.NamingService.getVMName()%>"/>

<ie:param name="DBUSER" data="wcadmin"/>

<ie:param name="GROUP_IN" data="documentx"/>

<ie:param name="GROUP_OUT" data="documenty"/>

<ie:param name="PASSWD" data="password"/>

<ie:param name="TYPE" data="wt.epm.structure.EPMMemberLink"/>

<ie:param name="DIRECTION" data="uses"/>

<ie:param name="DEPTH" data="9999" />

<ie:param name="MODE" data="NESTED"/>

<ie:param name="SELECTBY" data="LATEST"/>

</ie:webject>

0 REPLIES 0
Top Tags