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 ACTX | Context |
| Value Char COUNTER | Counter code |
| Value Char FCY | Site code |
| Value Date DAT | Date of the document |
| Value Char COMP | Complement value |
| Variable Char VAL | Complement code |
| Variable Char ERRMS | Error 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.