company logo

SetSelection - Set selection filter for collection

The action pops up with a dialog that allows entering an OSI condition for selecting instances in the current collection. When popping up, the multi-line edit field contains the last expression entered or is empty. After the filter has been configured, the list will be refreshed and only instances complying the selection criteria will be shown.

Selections may be defined as simple expression or as multi-statement function. In the latter case, statements have to be enclosed within { ... }.

Selections (filter) are set for the regions property handle, i.e. in a tree, all regions referring to the same property handle are reduced to the current selection, i.e. when selecting only female for person's children, children lists for each person show female children, only.

The action is disabled, when a selection has already been set.

// somple OSI expression

sex == 'female'

// OSI function - multi-statement condition

// show persons earning less than its children

{

VARIABLES

  int    children_income;

PROCESS

  while ( children.next() )

    children_income += children.income;

  if ( children.count > 0 )

    return ( children_income/children.count > income );

  else

    return false;

}