project BLF > class PMfgPro > method SetContextProperty

Description

Purpose: Set the value of a given session context property. Setting its value to the unknown value is considered a deletion.


Parameters


icPropertyQualifierinputcharacter
icPropertyNameinputcharacter
icPropertyValueinputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program1/pmfgpro.p)

assign oiReturnStatus = -98.

find first tContext where
           (tContext.tcPropertyQualifier = icPropertyQualifier or
            (icPropertyQualifier = ? and tContext.tcPropertyQualifier <> "QAD":U)) and
           tContext.tcPropertyName = icPropertyName no-error.

/* Reset ERROR-STATUS handle */
assign viCnt = 0 no-error.

if not available tContext
then do:
    if icPropertyValue = ? then return. /* Nothing to delete */
    create tContext.
    assign tContext.tcPropertyQualifier = icPropertyQualifier
           tContext.tcPropertyName = icPropertyName.
end.

if icPropertyValue = ?
then delete tContext.
else assign tContext.tcPropertyValue = icPropertyValue.

assign oiReturnStatus = 0.