project BLF > class BReportDaemon > method ValEmail
validation procedure
Description
Return an error is the e-mail address of selected user is empty.
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. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/breportdaemon.p)
if icTargetField <> ""
and icTargetField <> ?
then do:
<Q-2 run UserByUsrLogin (all) (Read) (NoCache)
(input icTargetField, (UsrLogin)
output dataset tqUserByUsrLogin) in BUser >
find first tqUserByUsrLogin no-error.
if available tqUserByUsrLogin
then if tqUserByUsrLogin.tcUsrMailAddress = ""
then do:
<M-1 run SetMessage
(input #T-1'Entered login must have a valid e-mail address.':255(9232)T-1# (icMessage),
input '' (icArguments),
input icTargetFieldName (icFieldName),
input icTargetField (icFieldValue),
input 'E' (icType),
input 3 (iiSeverity),
input icRowid (icRowid),
input 'BLF-130':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BReportDaemon>
oiReturnStatus = -1.
end.
end.