project BLF > class BUserRole > method Calculate

Description

Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.


Parameters


oiReturnStatusoutputinteger


Internal usage


unused


program code (program/buserrole.p)

<ANCESTOR-CODE>

    /* ==================================================================================================== */
    /* Field tUsrRoleScope.tcUsrRoleScopeValueExtended has to contain the tUsrRoleScope.tcUsrRoleScopeValue */
    /* extended with the CompanyCode between () or the SharedSetCode between [] if applicable to this RSV   */
    /* We can use the related-key-business-fields that were filled in the ancestor-code                     */
    /* ==================================================================================================== */
    for each tUsrRoleScope :
        assign tUsrRoleScope.tcUsrRoleScopeValueExtended = tUsrRoleScope.UsrRoleScopeValue.
        if tUsrRoleScope.tcCompanyCode <> ? and 
           tUsrRoleScope.tcCompanyCode <> "":U
        then assign tUsrRoleScope.tcUsrRoleScopeValueExtended = tUsrRoleScope.tcUsrRoleScopeValueExtended + ' (':U + string(tUsrRoleScope.tcCompanyCode) + ')':U.
        else if tUsrRoleScope.tcSharedSetCode <> ? and 
                tUsrRoleScope.tcSharedSetCode <> "":U
             then assign tUsrRoleScope.tcUsrRoleScopeValueExtended = tUsrRoleScope.tcUsrRoleScopeValueExtended + ' [':U + string(tUsrRoleScope.tcSharedSetCode) + ']':U.
    end. /* for each tUsrRoleScope */