Get a sequence number value

Script ANM_TOOL

NUMERO

This Funprog is used to get a sequence number.

Funprog NUMERO(ACTX,COUNTER,FCY,DAT,COMP,VAL,ERRMS)
Value Instance ACTXContext
Value Char COUNTERCounter code
Value Char FCYSite code
Value Date DATDate of the document
Value Char COMPComplement value
Variable Char VALComplement code
Variable Char ERRMSError message

Notes:
* If the counter value cannot be returned, the function returns [V]CST_AERROR, otherwise it returns [V]CST_AOK.
* The counter assignment must be used in a transaction (for instance in AINSERT_BEFORE, AUPDATE_BEFORE or even AINSERT_AFTER, AUPDATE_AFTER events). If this function is used in a script, verify that a transaction is opened by testing adxlog (or open it before).
* No default site is provided; the site must be given if the counter's structure requires it.