AddRange (add a range limit)

Top  Previous  Next



AddRange( field

|[ ,min limit [ ,max limit ]] |                 )



| ,primaryrelation, parentrelation |


Specifies a sort-specific range limit.


The label of the field to limit. This need not be a component of a KEY or INDEX, but VIEW performance is substantially faster if it is.

min limit

A variable that specifies the value, or the lower end of a range of values, to which the field is limited. If omitted, the field is limited to its current value.

max limit

A variable that specifies the upper end of an inclusive range of values to which the field is limited. The lower end of the inclusive range is specified by min limit. If max limit is omitted, the field is limited to the value of min limit.


The label of the RelationManager object for the managed VIEW's primary file. This limits all available linking fields to their current values in the corresponding parent file fields.


The label of the RelationManager object for the primary file's parent file. The ViewManager uses this object to get the limiting values from the parent file for a file-relationship range limit.

The AddRange method specifies a sort-specific range limit that may be applied to the VIEW when the range limit's sort order is active. When the range limit is applied, only those records whose field contains the specified value(s) are included in the result set. You may specify only one range limit per sort order.


The AddSortOrder method adds a sort order. The ApplyRange method applies the active sort order's range limit. The SetSort method sets the active sort order.

AddRange ignores the field parameter when the primaryrelation parameter is present.


MyView.AddSortOrder(ORD:ByCustomer)        !sort by customer no

MyView.AddRange(ORD:CustNo,Relate:Orders,Relate:Customer) !range limit by parent file

MyView.AddSortOrder(ORD:ByOrder)           !sort by order no

MyView.AddRange(ORD:OrderNo)               !range limit by current

                                           !value of ORD:OrderNo

See Also:     AddSortOrder, ApplyRange, SetSort