Determine Every

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.

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