project QadFinancials > class BCOAMaskCC > 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/bcoamaskcc.p)

<ANCESTOR-CODE>

if icTableName = "COAMaskCC":U
then do:
    <I-2 {bFcOpenInstance
         &CLASS           = "Session"}>
    <M-1 run GetIntegerValue
       (input  'SharedSetForCOSTCENTERCOAMASK':U (icName), 
        output tCOAMaskCC.SharedSet_ID (oiValue), 
        output viFcReturnSuper (oiReturnStatus)) in Session>
    <I-3 {bFcCloseInstance
         &CLASS           = "Session"}>
    if viFcReturnSuper <  0 or (viFcReturnSuper > 0 and oiReturnStatus = 0)
    then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0 then return.

    assign tCOAMaskCC.COAMaskCCIsActive = true.
end. /* if icTableName = "COAMaskCC" */

if icTableName = "COAMaskCCGL":U
then do:
    <I-4 {bFcOpenInstance
         &CLASS           = "Session"}>
    <M-5 run GetIntegerValue
       (input  'SharedSetForGL':U (icName), 
        output tCOAMaskCCGL.GLSharedSet_ID (oiValue), 
        output viFcReturnSuper (oiReturnStatus)) in Session>
    <I-6 {bFcCloseInstance
         &CLASS           = "Session"}>
    if viFcReturnSuper <  0 or (viFcReturnSuper > 0 and oiReturnStatus = 0)
    then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0 then return.
end. /* if icTableName = "COAMaskCCGL" */

if icTableName = "COAMaskCCDiv":U
then do:
    <I-7 {bFcOpenInstance
         &CLASS           = "Session"}>
    <M-8 run GetIntegerValue
       (input  'SharedSetForDIVISION':U (icName), 
        output tCOAMaskCCDiv.DivSharedSet_ID (oiValue), 
        output viFcReturnSuper (oiReturnStatus)) in Session>
    <I-9 {bFcCloseInstance
         &CLASS           = "Session"}>
    if viFcReturnSuper <  0 or (viFcReturnSuper > 0 and oiReturnStatus = 0)
    then assign oiReturnStatus = viFcReturnSuper.
    if oiReturnStatus < 0 then return.
end. /* if icTableName = "COAMaskCCDiv" */