Dynamic View Services > Specifying Dynamic View Types > Representation and Propagation Conditions > Specifying Conditions
 
Specifying Conditions
For example, if you want to filter out all the employees whose monthCost attribute is included in the range [lowCost,highCost] in the DepartmentTable tree, you must define a new parameter on the view type. This parameter is a Boolean value that indicates whether the filter is active or not. This new view parameter is used in the representation condition of an Employee object in the view DepartmentTable, as shown below.
Example
view DepartmentTable(int lowCost=0,
          int highCost=100000,
          boolean filterOn=false):
...
subscribe Employee:
represent RowR row
          when (filterOn=false)
                    || (monthCost<view.lowCost)
                    || (monthCost>view.highCost):
string column[1]=name;
...

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.