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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Is it possible to get the non-latest iteration of a document using List-ContentItems?

AdamElkins
6-Contributor

Is it possible to get the non-latest iteration of a document using List-ContentItems?

Is it possible to get the non-latest iteration of a document using List-ContentItems? I am using search-objects to get version B.1 which is in a state of released, but there is a B.2 that is inwork. I am then call List-ContentItems with that document which has an obid that starts with OR:. The List-ContentItems task returns the VR: version of the document which appears to be the version identifier, representing all iterations of the document, rather than the OR version, or Object Version of the document, representing a specific iteration of the document I am passing into the List-Content items webject. I am trying to get the content for the non-latest iteration of a document.

 

 

 

5 REPLIES 5

Haven't tried it myself.. but from the documentation it looks like it should work. 

https://support.ptc.com/help/wnc/r12.1.1.0/en/index.html#page/Windchill_Help_Center/WCAdapterGuide/WC_WebjectLib_ListContentItem.html

 

When you call List-ContentItems, where are you passing the result from Search-Objects?

AdamElkins
6-Contributor
(To:joe_morton)

Yes, that is what I am doing, The problem is it is giving me the VR object back, which is the revision, encompassing all iterations in that revision instead of the OR object which represents a specific iteration within a revision of that object.

Yeah, that's why I was asking to what parameter in List-ContentItems are you passing the Search-Objects result? It looks like it can take many different parameters. 

 

OBJECT_REF looks like it would be use a unique ID. 

 

If you use WHERE and TYPE you'd have to make sure your query in WHERE returns the unique item.

AdamElkins
6-Contributor
(To:joe_morton)

I am using OBJECT_REF.

AdamElkins
6-Contributor
(To:AdamElkins)

This basically what I am running. Search-Objects returns the OR object, but when I pass that into List-ContentItems I get back the VR object.

<ie:webject name="Search-Objects" type="OBJ">
	<ie:param name="INSTANCE" data="${@FORM[]supporting-adapter[*]}" valueSeparator=";" delim=";" default="<%=NamingService.getVMName()%>"/>
    <ie:param name="OBJECT_REF" data="$(@FORM[]obid[])"/>
    <ie:param name="ATTRIBUTE" data="$(@FORM[]attr[*])" delim="," default="*"/>	
    <ie:param name="WHERE" data="$(@FORM[]where[*])" delim=","/>	
    <ie:param name="TYPE" data="$(@FORM[]type[*])" delim=","/>	
    <ie:param name="CONTAINER_REF" data="$(@FORM[]containerref[*])" />	
    <ie:param name="ITERATION" data="$(@FORM[0]iteration[0])" default="ALL" />	
    <ie:param name="VERSION" data="$(@FORM[0]version[0])" default="ALL" />	
    <ie:param name="SORTBY" data="$(@FORM[]sortby[*])"/>	
    <ie:param name="SORTED" data="$(@FORM[]sorted[*])"/>	
    <ie:param name="PAGE_COUNT" data="$(@FORM[]pageCount[])"/>
    <ie:param name="PAGE_OFFSET" data="$(@FORM[]pageOffset[])"/>
	<ie:param name="GROUP_OUT" data="holders"/>
</ie:webject>

<ie:webject name="List-ContentItems" type="OBJ">
  <ie:param name="INSTANCE" data="${@FORM[]supporting-adapter[*]}" valueSeparator=";" delim=";" default="<%=NamingService.getVMName()%>"/>
    <ie:param name="ATTRIBUTE" data="urlLocation,mime" delim="," default="*"/>	
  <ie:param name="GROUP_IN" data="holders" />
  <ie:param name="GROUP_OUT" data="cItems" />
</ie:webject>

 

Top Tags