Filter (FILTER)
The filter operator creates a property, defined on the objects of an object group, that returns TRUE when their object collection is included in the group's current filter, and NULL otherwise. It accounts for the form's filters and class restrictions, the filters selected in its filter groups, the user filters and the view filters. Only applied conditions are included: changes waiting for the manual filter apply are not.
Language
To declare a property that determines matching the filter use the FILTER operator.
Examples
CLASS Store;
name = DATA STRING[100] (Store);
FORM stores
OBJECTS s = Store
;
countF 'Number of filtered warehouses' = GROUP SUM 1 IF [ VIEW stores.s](Store s);
orderF 'Order in an object group' (Store s) = PARTITION SUM 1 IF [ FILTER stores.s](s) ORDER [ ORDER stores.s](s), s;
setNameX 'Add X to name'() {
LOCAL k = INTEGER ();
k() <- 0;
FOR [ FILTER stores.s](Store s) ORDER [ ORDER stores.s](s) DO {
k() <- k() + 1;
name(s) <- 'X' + k() + name(s);
}
}