project BLF > class BSharedSetType > method CalcCalcSharedSetTypeCodeTr

query calculated fields procedure

Description

Assign a value to query calculated field pqSharedSetTypeByActive.tcCalcSharedSetTypeCodeTr


Parameters


ilSharedSetTypeIsActiveinputlogical
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
query SharedSetTypeByActive


program code (program1/bsharedsettype.p)

assign viIndexPosition = lookup({&tcSharedSetTypeCode},vcSharedSetTypeCodes,chr(2)) no-error.
    if viIndexPosition MODULO 2 = 0 
    then assign viIndexPosition = viIndexPosition - 1 no-error.
    assign {&tcCalcSharedSetTypeCodeTr} = entry(viIndexPosition,vcSharedSetTypeCodes,chr(2)) no-error.