project BLF > class BUser > method ValDefaultLanguage
validation procedure
Description
validation of default language, only active + system languages allowed
Parameters
icTargetField | input | character | Value of the business field to validate. |
icTargetFieldName | input | character | Name of the business field to validate. |
icRowid | input | character | Contents of field tc_Rowid, if the target field is a field of a component temp-table. |
ilActive | input | logical | |
ilLngIsSystemLanguage | input | logical | LngIsSystemLanguage |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program4/buser.p)
if not ilActive
then do:
assign vcMessage = trim(#T-3'Only active languages are allowed.':255(519)T-3#)
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-236':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BUser>
end. /* if not ilActive */
if not ilLngIsSystemLanguage
then do:
assign vcMessage = trim(#T-4'Only system-owned languages are allowed.':255(520)T-4#)
oiReturnStatus = -1.
<M-2 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-237':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BUser>
end. /* if not ilLngIsSystemLanguage */