Altova RecordsManager

The button controls of the form enable you to add condition branches for defining the field selection.

RMAddBranch_Buttons

The buttons, from left to right, are as follows:

 

Add Condition adds a condition (see below for details). If the added condition is not the first top-level item, then it is joined to the previous top-level item with a logical AND operator. Click the AND operator to change it to a logical OR operator. Next, select the field on which you wish to place a condition and specify the condition as described below.

Add Filter adds an existing filter (see below for details) as a condition. The ability to add existing filters as conditions enables you to avoid duplicating filters and provides for the modular composability of filters. If the added filter is not the first top-level item, then the new filter is joined to the previous top-level item with a logical AND operator. Click the AND operator to change it to a logical OR operator. Next, select the existing filter that you want to use as an additional condition.

Add Search in Other Data Table (or Add Condition on Other Data Table) adds a set of conditions for another data table (ancestor, child, or linked-to data table). This top-level item provides the ability to set conditions for other data tables. If it is not the first top-level item, then it is joined to the previous top-level item with a logical AND operator. Click the AND operator to change it to a logical OR operator. Next, select the data table on which you wish to place conditions and specify the conditions in the usual way as described below. If no ancestor, child, or link-to data tables have been defined, then this button does not appear.

Add [ or Add Bracket adds a bracket item that enables you to define set of conditions within a bracket. This enables you to more easily structure a hierarchy of conditions. If the bracket item is not the first top-level item, then it is joined to the previous top-level item with a logical AND operator. Click the AND operator to change it to a logical OR operator. You can now add a condition, filter, or sub-bracket and define conditions as described below.

 

 

Add the conditions

Create the conditions in one of the following ways:

 

Add a new condition by clicking Add Condition, then selecting (i) the field you want to filter (for example, Status in the first condition of the screenshot below) or a direct condition; if you enter a direct condition, you do not need to—and will not be allowed to—define the condition any further, (ii) the selector (such as equal or one of in the screenshot below; see list of selectors below), and (iii) the field value/s on which to filter (such as Active in the screenshot above). The first condition in the screenshot below selects only those records of the data table that have a Status field with a value equal to Active. The data table's records will therefore be filtered for this condition.

Click to expand/collapse

Add multiple conditions so that the filter is a combination of conditions that are all connected by either the logical AND operator or the logical OR operator. The filter can be composed entirely of new conditions or can be a combination of existing (previously created) filters and new conditions. In the screenshot above, the filter is a combination of two new conditions joined by a logical AND operator. The operators become available when a second item (new condition or existing filter) is added to the filter. Note that you cannot combine the AND and OR operators in a single filter (that is, you cannot create X AND Y OR Z). If you want to combine operators, do the following: (i) Create a filter with one logical operator, and save it; (ii) Create a new filter which uses the first (existing)  filter and combine it with the other operator and the new condition/s. Such a filter—(FILTER-2) in the following—would have a structure something like this: [ FILTER-2 = (FILTER-1 = C1 AND C2 AND C3) OR (C4) OR (C5) ]

 

Note:Only those records are displayed for which the overall condition returns Boolean true(). So, for example: (i) true() AND false() returns false(), but true() OR false() returns true(); (ii) [[true() AND false()] OR [true()]] returns true().

 

Direct conditions

Direct conditions do not require you to enter any field or selector values, but directly specify the condition to check. The following are direct conditions, and they are listed along with fields in the first dropdown list and can be selected there.

 

Record is new: The condition is true when the record being edited is a new record. The condition is false in all other cases.

Record exists: The condition is false when the record being edited is a new record. The condition is true in all other cases.

Record is valid: The condition is true when the record returns no validation errors. Validation warnings are ignored. (Available for form scripts only; not for filters.)

Record is invalid: The condition is true when there are record validation errors. Validation warnings are ignored. (Available for form scripts only; not for filters.)

 

Selectors

The kinds of selectors that are available depends on the data type of the field that is chosen for filtering. The selectors for the different data types are listed below.

 

 

Filter parameters

If you have declared one or more filter parameters on the filter (see Create Filters), then you can enter a parameter name from which to obtain the value to test the condition. Initially, the optional default value of the parameter will be used to test the condition. However, the user can supply the parameter value (via the Predetermined Values option of data table pages), and, in this way, can determine the filter selection. You, as the designer, can decide how the user can customize the filter. For more information, see Create Filters.

 

© 2018-2024 Altova GmbH