Rule Interface
The Rule Interface can be opened from the Rule column of the following tasks:
- Metadata Fields Management
- Metadata Filter
- Metadata Level Creation
- Metadata Sequencer
- Input from SharePoint
Conditions are expressed using the following syntax:
<EXPRESSION 1> <OPERATOR> <EXPRESSION 2>
The <EXPRESSION 1>
and <EXPRESSION 2>
options represent the values for comparison. The interface displays clickable links as the following:
- First link: click to set the first expression.
- Second link: click to choose the operator from a popup menu.
- Third link: click to set the second expression.
Operators
The Operator options are listed below.
- IS EQUAL TO
- IS NOT EQUAL TO
- IS EQUAL TO OR GREATER THAN (>=)
- IS EQUAL TO OR LESS THAN (<=)
- IS CONTAINED IN
- IS NOT CONTAINED IN
- CONTAINS
- IS GREATER THAN
- IS LOWER THAN
- STARTS WITH
- ENDS WITH
- VALUE CHANGED
Expressions
The first expression <EXPRESSION 1>
can either be a custom list or a parsable edit field. The second expression <EXPRESSION 2>
is always a parsable edit field.
When you click a link to set an expression, an input field appears below that link. Right-clicking this field opens a popup menu that gives access to variables, the Data Selector (see Data selections) and the Data Repository Manager (see Data Repository Manager).
Wildcard parameter
Expressions may contain metadata/data selection functions (see Data selections). These functions accept a wild card parameter "?", indicating the function operates on all nodes (not just one) of a given level.
Examples
- In a PDF emulation, the format of a selected region could be:
region(?,0.59375,2.21875,1.85416,2.51041,KeepCase,NoTrim)
In this case “?” represents the current physical data page processed by the task. - The following rule:
(GetMeta(SelectedIndexInDocument[0], 11, Job.Group[?].Document[?].Datapage[?]) Equal 0
loops through all datapages in a job, comparing their index in the document to a value.
Index/Count values
When using Index/Count values in a rule, please note that these values are zero-based: the first element in any collection has an index of 0 and the last element's index corresponds to the collection's length minus 1. For example, the following rule checks all Datapages to see if it is the first in its containing Document:(GetMeta(SelectedIndexInDocument[0], 11, Job.Group[?].Document[?].Datapage[?]) Equal 0)
Adding Conditions and Sub Conditions
The Rule Interface is used to add/remove conditions or sub conditions. The available options are:
- Add Condition: Create a new condition at the selected level, using a standard logical operator (AND, OR).
- Add Sub condition: Indent the selected condition by one level and create a new condition at this level, linked with the selected condition by a standard logical operator (AND, OR). The purpose of using sub conditions is to explicitly arrange the order on which conditions are evaluated and the way they are nested together.
- Delete Condition: Delete the selected condition.
Example
As an example, consider the following conditional expression, where A, B, C and D are conditions of the form <EXPRESSION 1><OPERATOR><EXPRESSION 2>
:
A and (B or C) and D
Such a conditional expression can be expressed by means of sub conditions in the following way:
- Define condition A.
- Select condition A and choose Add Condition. Specify the logical operator AND.
- Define condition B.
- Select condition B and choose Add Sub Condition. This will indent condition B and allow to define the condition C. Specify the logical operator OR.
- Define condition C.
- Right click on the first AND operator (the one right after condition A) and choose Add Condition. Specify the logical operator AND. This will create a condition at the same level as A.
- Define condition D.
The resulting conditional expression will be indented like this:
A
AND
B
OR
C
AND
D