project BLF > class BRole > method ValRoleBusComponentConcept

validation procedure

Description

Validation on field Role.RoleBusComponentConcept


Parameters


icTargetFieldinputcharacterValue of the business field to validate.
icTargetFieldNameinputcharacterName of the business field to validate.
icRowidinputcharacterContents of field tc_Rowid, if the target field is a field of a component temp-table.
iiBusComponentIDinputintegerValue of field Role.BusComponent_ID
icBusComponentCodeinputcharacterValue of Role.tcBusComponentLabel
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
validation on tRole.RoleBusComponentConcept


program code (program5/brole.p)

if icTargetField <> "":U and 
       icTargetField <> ?    and 
       (iiBusComponentID = 0 or
        iiBusComponentID = ?)
    then do :
        assign vcMessage      = trim(substitute(#T-2'The role scope concept (&1) should only be specified if the role scope class (&2/&3) is specified also.':255(549)T-2#,(if icTargetField = ? then "?":U else icTargetField),(if iiBusComponentID = ? then "?":U else string(iiBusComponentID)),(if icBusComponentCode = ? then "?":U else icBusComponentCode)))
               oiReturnStatus = -1.
        <M-1 run SetMessage
          (input  vcMessage (icMessage), 
           input  '':U (icArguments), 
           input  icTargetFieldName (icFieldName), 
           input  icTargetField (icFieldValue), 
           input  'E':U (icType), 
           input  3 (iiSeverity), 
           input  icRowid (icRowid), 
           input  'BLF-187':U (icFcMsgNumber), 
           input  '' (icFcExplanation), 
           input  '' (icFcIdentification), 
           input  '' (icFcContext), 
           output viFcReturnSuper (oiReturnStatus)) in BRole>
    end. /* if icTargetField <> "":U and */