Syntax
DETERMINE EVERY <iterator> [ SERIAL ] [ SECURE | KEYONLY ] [ MULTI records ] [ GS status ] <logic_block> END | ENDEXIT | ENDNOPRINT <iterator> := <object> | <profile> <object> := object_name( argument [ ,...n ] ) <profile> := object_name.profile_name( argument [ ,...n ] )
Parameters
Determine Every can be abbreviated as DT Every.
iterator
The key values to read. Note that there should be a space between the qualifier and the brackets containing the parameters.
,.…n
The key values to start reading back from.
SERIAL
Increases efficiency by retaining pointers. Refer to Serial for more information.
SECURE
Facilitates record locking of the database in applications that do not force integrity. Refer to Secure for more information.
KEYONLY
The KeyOnly command option is not supported on applications that are deployed to Windows.
For MCP-based systems, refer to KeyOnly.
MULTI records
The Multi command option is not supported on applications that are deployed to Windows or MCP.
GS status
Indicates if there are no records retrieved, using the specified qualifier.
Description
The Determine Every logic command reads persistent class records that match the specified key values into memory from the database. The data read from the database is stored in the instance of the persistent class specified in the command.
Refer to Determine Variants for more information on the Determine logic command.
Restrictions
If the profile keys are changed within a Determine Every logic statement loop, the results might be inconsistent.
Example
In this example, for each product, the report lists the ProductID and ProductName, and then lists details of every sale that has occurred for that product. The Determine Every command is used to retrieve every SaleEvent transaction for the ProductID specified, moving the details into the SaleDetail frame and printing.
Determine Actual Product.P_ProductName ProductDetail.ProductID := Product.ProductID ProductDetail.ProductName := Product.ProductName ProductDetail.Print() Determine Every SaleEvent.P_ProductID (Product.ProductID) SaleDetail.CustomerID := SaleEvent.CustomerID SaleDetail.Quantity := SaleEvent.SoldQuantity SaleDetail.Print() End If (GLB.STATUS = "*****") SaleDetail.CustomerID := “NONE” SaleDetail.Quantity := 0 SaleDetail.Print() End End
For this example, some of the output from the report is illustrated, in product name order:
Product Name: CatBathSoap Sold Quantity: 0 | Product ID: 7 Customer ID: None |
Product Name: Chips for Cats Sold Quantity: 50 14 |
Product ID: 2 Customer ID: 2 1 |
Product Name: DogBelt Sold Quantity: 0 |
Product ID: 6 Customer ID: None |
Product Name: Gimborn R-7 Sold Quantity: 0 |
Product ID: 3 Customer ID: None |
Product Name: KittenCaps Sold Quantity: 10 34 | Product ID: 2 Customer ID: 3 2 |