project QadFinancials > class BSafStructure > method InitialValues

Description

Add code here to initialize the calculated fields of a 'new' record (= a record that must be created in the application database) in a class temp-table.


Parameters


icTableNameinputcharacterName of the database table of which a record is created in the class temp-table.
oiReturnStatusoutputinteger


Internal usage


unused


program code (program/bsafstructure.p)

<ANCESTOR-CODE>

if oiReturnStatus < 0
then return.

case icTableName:
    when "SafStructure":U
    then assign tSafStructure.SafStructureIsActive = true.
    when "SafStructureLine":U
    then do:
        assign tSafStructureLine.SafStructureLineNumber = 0.
        for each bSafStructureLine:
            ACCUMULATE bSafStructureLine.SafStructureLineNumber (MAXIMUM).
        end.                        
        assign tSafStructureLine.SafStructureLineNumber = (ACCUM MAX bSafStructureLine.SafStructureLineNumber) + 1.
    end.            
end case.