validation procedure
Parameters
iiTargetField | input | integer | Value of the business field to validate. |
icTargetFieldCode | input | character | |
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. |
icGLAccountType | input | character | |
ilGLAccountIsActive | input | logical | |
ilGLAccountIsWithProject | input | logical | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bexpenseglmatrix.p)
/* ============================================= */
/* Check the properties of ProjectGL */
/* ============================================= */
if icGLAccountType <> {&GLTYPECODE-STAN} or
ilGLAccountIsActive <> true or
ilGLAccountIsWithProject <> true
then do :
assign vcMessage = trim(substitute(#T-2'The project GL account (&1) must be an active standard account defined with projects (ID: &2).':255(22)t-2#,icTargetFieldCode,string(iiTargetField))) + chr(10) +
trim(substitute(#T-3'Properties of account '&1':':255(7)T-3#,icTargetFieldCode)) + " ":U +
(if icGLAccountType <> {&GLTYPECODE-STAN} then trim(#T-4'Not standard':60(8)t-4#) else trim(#T-5'Standard':60(9)t-5#)) + ", ":U +
(if ilGLAccountIsActive <> true then trim(#T-6'Inactive':60(10)t-6#) else trim(#T-7'Active':60(11)t-7#)) + ", ":U +
(if ilGLAccountIsWithProject <> true then trim(#T-8'Project Disabled':60(21)T-8#) else trim(#T-9'Project Enabled':60(20)T-9#))
oiReturnStatus = -1.
<M-1 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input icTargetFieldName (icFieldName),
input string(iiTargetField) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input icRowid (icRowid),
input 'QADFIN-1580':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BExpenseGLMatrix>
end. /* if ilActive <> true */