Click or drag to resize

DbServer.ForBlock Property

X#
The "FOR block" component of the "general server scope," which affects several bulk processing methods if they are called with no explicit scope.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.19
Syntax
 VIRTUAL PROPERTY ForBlock AS USUAL GET SET 
Request Example View Source

Property Value

Type: Usual
The "FOR block" component of the "general server scope," which affects several bulk processing methods if they are called with no explicit scope.
Remarks
The "FOR block" component of the "general server scope," which affects several bulk processing methods if they are called with no explicit scope. The FOR block can be specified as a code block or a string. This access always returns a code block. Specifying a FOR block makes the method process all those records where the FOR block evaluates TRUE, subject to other scope settings, of course. Specifying a FOR block makes the Scope default to ALL in those cases where it is otherwise "current record," unless a WhileBlock is also specified in which case it is set to REST.
Examples
This example assigns a code block to ForBlock to limit the scope of a recall operation:
X#
1// RECALL FOR Last == "Smith" REST
2oDB:ForBlock := {|| Last == "Smith"}
3oDB:Scope := DBSCOPEREST
4oDB:Recall()
5oDB:ClearScope()
See Also