Search condition to find objects referenced in specific way

Build 1501 on 14/Nov/2017  This topic last edited on: 4/Sep/2014, at 15:33

This search condition restricts results to only archive objects that reference a source object which type is set to WireFeed which is the second element in the enumeration for source.

<searchObjectUI . . .>

 

  <!--restrict results to all archiveObjects 

                  that reference a "source" object 

                  for which "type" is set to "WireFeed"

 -->

  <searchConditions>

    <SearchNode 

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

                         xsi:type="SearchConditionList" 

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

      <List 

                                 Op="In" 

                                 Path="[archiveObject.sourceRef.type]" 

                                 IsFulltext="false">

        <IdList>

          <!--1 is 0-based index of the second entry of source.type, i.e. "WireFeed"-->

          <IdName Id="1" />

        </IdList>

      </List>

    </SearchNode>

  </searchConditions>

Alternative:

<searchObjectUI . . .>

 

  <!--restrict results to all archiveObjects 

                  that reference a "source" object 

                  for which "type" is set to "WireFeed"

 -->

  <searchConditions>

    <SearchNode 

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

                         xsi:type="SearchConditionList" 

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

      <List 

                                 Op="In" 

                                 Path="[archiveObject.sourceRef.type]" 

                                 IsFulltext="false">

        <IdList>

          <!--1 is 0-based index of the second entry of source.type, i.e. "WireFeed"-->

          <IdName Name="WireFeed" />

        </IdList>

      </List>

    </SearchNode>

  </searchConditions>