The Filter Constructor is a dialog tool which helps you to diagnose and built a complex LDAP filter hierarchy:
As we've seen in the topic about the LDAP filter string syntax, LDAP filters which contains several criteria can be quite confusing because of the use of the so-called 'Polish Notation': the logical operators are always placed in front of the operands.
An example: If you want to filter object with the criteria User whose name begins with 'P' or 'T', then the regarding LDAP filter have to look like this (AND (User with 'P...')(Users with 'T') ).
The Filter Constructor can take a filter and detect it's logical hierarchy. This hierarchy can be displayed end edited in a tree view box. Therefore the constructor is the ideal tool whenever a filter string can be edited - for example in the LEX Filter Factory, or in the application options for configuring the object lit filter.
LDAP Filter Structure
This is the logical LDAP filter hierarchy. Each line represents either a single filter criterion or a logical operator (like AND, OR, NOT).
AND, OR, NOT, Filter radio buttons
These radio buttons can be used to specify the characteristics of the currently selected node in the LDAP Filter Structure. If you choose one of the logical operators AND/OR/NOT, you can create a sub node for this line with other filter elements. The operator NOT allows only one sub node, the other two operators can have any count of sub nodes you like. Child nodes can be created with the New Child button.
On the other hand, there could be restrictions for nodes that already have some child nodes: You cannot switch to Filter if there are some child node, and you cannot switch to NOT if there are more than one child nodes.
If you choose the type Filter for a node, then you can specify the attribute for which the filter criteria will be configured. The attribute will be shown up as (attribute=...) in the tree view. If LEX evaluated the director schema correctly before, than you ave a list of all the LDAP server's attributes in the drop down text box of the attribute name. Later on, you can use the Edit function to configure the criteria.
New Parent button
This replaces the current selected node position with an AND operator, and places the current node as a child node for this AND. This enables you to open a new logical hierarchy section.
New Child button
This adds a new child node to the currently selected node. This button is only available if the currently selected node is a logical operator (AND, OR, NOT)
This can move the currently selected node (and it's child nodes) to another place in the logical hierarchy. If you use this function, you see a tree selection dialog, where ou can set the destination node for the move operation. Please note that only the nodes which actually can act as a move destination are marked green here:
If you want to change the order of siblings in the same logical hierarchy, you have to choose the Up and Down arrows.
This button deletes the currently selected node and all it's child nodes. Be careful, because LEX cannot undo this step (unless you leave the Constructor dialog with Cancel).
This button opens the Single Filter editor dialog. You can edit the actual filter syntax of one single attribute criterion line.
Global Search button
Instead using the LDAP filter from the Constructor dialog somewhere else, you can just do a quick global search with it here. Global means that a directory search is started with the current filter which is represented by the construction hierarchy. The search base is the current LDAP root container of your connection.
This converts the constructed filter hierarchy back into an text string with the according filter syntax, and returns to the dialog from where the Filter Constructor has been started.
This closes the dialog and discards all changes.