Multiple search conditions

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 17:03

Find articles which name contains specific letters

   <SearchConditions

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns="http://www.teradp.com/schemas/GN4/1/SearchConditions.xsd">

     <SearchNode

      xsi:type="SearchConditionList">

       <List Op="In" Path="ObjectType.Id" >

         <IdList>

           <IdName Name="article" />

         </IdList>

       </List>

       <List

          Path="[article.name]"

    Op="Ending"

    FromValue="10"

    IsFulltext="false"

        />

     </SearchNode>

  </SearchConditions>

Find imgs in specified folder, created in last 24 hours which name ends with specified string

This search condition has four criteria:

1.Object has to be of the "img" type.

2.It has to be in specific folder.

3.It has to be created in last 24 hours.

4.Its title has to end with "A00100".

In other words, use it if you need to search in a workflow for a specific folder for an img that has a title that ends in A00100 and was created in the last 24 hours.

<SearchConditions

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xmlns="http://www.teradp.com/schemas/GN4/1/SearchConditions.xsd"

  ObjectTypeName="img">

  <SearchNode 

                 xsi:type="ConditionSearchNode" 

                 Op="And">

    <Left 

                 xsi:type="ConditionSearchNode" 

                 Op="GreaterEqual">

      <!--

        This is the attribute used to determine the age of the object,

        it can be 'modifiedDate' to use the last modification or

        'creationDate' to use the creation date/time

      -->

      <Left 

                         xsi:type="AttributeSearchNode" 

                         Path="folderObject.modifiedDate"/>

      <!--

        This is the specification of how old: day.hours:minutes:seconds

      -->

      <Right 

                         xsi:type="DateTimeRelativeSearchNode" 

                         Interval="-01.00:00:00" />

    </Left>

    <Right 

                         xsi:type="SearchConditionList">

              <List 

                                 Op="InSubtree" 

                                 Path="[folderObject.folderRef]" 

                                 TreeParentRefAttributeName="folderParent" 

                                 IsFulltext="false">

        <IdList>

          <!--

            This is the database id of the folder

          -->

          <IdName Id="103021"/>

        </IdList>

      </List>

      <List 

                                 Path="[img.title]" 

                                 Op="Ending" 

                                 FromValue="A00100" 

                                 IsFulltext="false"/>

    </Right>

  </SearchNode>

</SearchConditions>

To test it save the SearchConditions as is in the file ‘c:\temp\searchConditions.xml’ and then execute it with cmd4, like:

cmd4 get -conditions c:\temp\searchConditions.xml -out c:\temp\output.xml -username ... -password ...

Click to toggle expandHow to read this search condition?