ordScope()
Set or clear the boundaries for scoping key values in the controlling order
Syntax
ordScope(<nScope>, [<expNewValue>]) → uCurrentValue
Arguments
nScope is a number specifying the top (TOPSCOPE) or bottom (BOTTOMSCOPE) boundary.
Note: To use the TOPSCOPE and BOTTOMSCOPE constants, you must include (#include) the ord.ch header file in your application.
expNewValue is the top or bottom range of key values that will be included in the controlling order's current scope. expNewValue can be an expression that matches the data type of the key expression in the controlling order or a code block that returns the correct data type.
Omitting expNewValue or specifying it as NIL has the special effect of resetting the specified scope to its original default. The default top range is the first logical record in the controlling order, and the default bottom range is the last logical record.
Returns
If expNewValue is not specified, ordScope() returns and clears the current setting. If expNewValue is specified, the function sets it and the previous setting is returned.
Description
The range of values specified using ordScope() is inclusive. In other words, the keys included in the scope will be greater than or equal to the top boundary and less than or equal to the bottom boundary.
Note: To return current settings without changing them, call the dbOrderInfo() function using the DBOI_SCOPETOP and DBOI_SCOPEBOTTOM constants.
So, try:
Code: Select all
dbOrderInfo( DBOI_SCOPETOP )
dbOrderInfo( DBOI_SCOPEBOTTOM )
For inactive Scope both should return NIL