project QadFinancials > class BVATPeriod > method ValPeriodBetween1And99

validation procedure

Description

Period must be situated between 1 and 99.


Parameters


iiTargetFieldinputintegerValue of the field to validate.
icTargetFieldNameinputcharacterName of the field to validate. Use the database field name or public data item name.
Example : 'Order.Order-Num'.
icRowidinputcharacterContents of field tc_Rowid, if the target field is a field of a component temp-table.
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on tVatPeriod.VatPeriodPeriod


program code (program4/bvatperiod.p)

if iiTargetField < 1 or
   iiTargetField > 99
then do:
    <M-1 run SetMessage
          (input  trim (#T-2'The period ($1) must be a value between 1 and 99.':100(3877)T-2#) (icMessage), 
           input  string(iiTargetField) (icArguments), 
           input  icTargetFieldName (icFieldName), 
           input  string(iiTargetField) (icFieldValue), 
           input  'E':U (icType), 
           input  3 (iiSeverity), 
           input  icRowid (icRowid), 
           input  'QADFIN-194':U (icFcMsgNumber), 
           input  '' (icFcExplanation), 
           input  '' (icFcIdentification), 
           input  '' (icFcContext), 
           output viFcReturnSuper (oiReturnStatus)) in BVATPeriod>
                     
    assign oiReturnStatus = -1.
end.