Searches on the GN4 database are performed by executing a Search REST call, passing to it the name of a search condition that has been previously loaded into the database. Search conditions are simply XML files which are loaded in the GN4 database as configurations.
There are two ways to construct a search condition:
The general structure of the xml of a search condition for each of these methods is shown here:
Using ConditionSearchNode:
<SearchConditions>
<SearchNode>
<Left>
<Right>
</SearchNode>
<OrderList>
<Item>
</OrderList>
</SearchConditions>
Using SearchConditionList:
<SearchConditions>
<SearchNode>
<List>
<From/>
</List>
</SearchNode>
<OrderList>
<Item>
</OrderList>
</SearchConditions>
Both methods are valid for creating search conditions and may be used interchangeably in most cases. Limitations of each are mentioned in each section.
It is also possible to place hidden search controls in a search form, with syntax like this:
<searchObjectUI . . .>
<attribute path="ObjectType.Id" op="In" objectTypes="contact" mode="Hidden" />
. . .
But this mechanism is limited as there are many search conditions we can not generate this way.
SearchConditions are much more general. When set, the search conditions provided are appended to the search conditions generated by the search controls of the form.
For an example of use see Search condition to find objects references in specific way.