ConditionSearchNode

Build 1501 on 14/Nov/2017  This topic last edited on: 26/Feb/2014, at 11:07

The search condition defined below returns a list of folderObjects (ObjectTypeName="folderObject" ) which reference a specified list of folder ids.  It uses a parameter named "folderIds" (Name="folderIds") to pass the list of ids (Type="IdList") in which to search.

<SearchConditions

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

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

  ObjectTypeName="folderObject">

  <SearchNode xsi:type="ConditionSearchNode" Op="In">

    <Left xsi:type="AttributeSearchNode"

      Path="folderObject.folderRef" />

    <Right xsi:type="VariableSearchNode"

           Name="folderIds" Type="IdList" />

  </SearchNode>

</SearchConditions>

 

This search returns a list of folder objects which have a folder reference 'In' a specified list of folder ids.

To execute this search in a browser, (assuming it has been loaded into the GN4 database from the file, search_folderObjectInFolders.xml), use a statement such as:

http://localhost/Tark4/do.ashx?Cmd=search&name=folderObjectInFolders&pars=folderIds:27754,28012

to return a list of all objects contained in the folders with ids = 27754 and 28012.

NOTE: You MUST use the ConditionSearchNode with the 'In' operator when passing a list of ids as parameters.