Question:
I need a consecutive number for my documents. How can I get this?
I need a consecutive number for my documents. How can I get this?
Answer:
Please refer to the following guide to get consecutive numbers for my documents;
Please refer to the following guide to get consecutive numbers for my documents;
Create the following Global variables;
- DocID – Type Integer
- oldDocID – Type Integer
- oldRN – Type Integer
- Client – Type Text
- Create a new Assign data activity with the following assignments;
Workflow global variable = DocID = Index entry of the document = Doc ID
Workflow global variable = Client = Index entry of the document = Company
- Next, create another Assign Data activity with the following assignments;
Workflow global variable = OldDocID = File cabinet = Doc ID = DW_Company = CV_Client AND DW_DocID < > GV_DocID
- Create a new ‘Assign Data’-step (here: Get old RN)
- Fill the variable ‘oldRN’ using a value from the file cabinet
Here Document Number is used as Invoice Number
DW_DocID = GC_OldDocID
- Create a new ‘Assign Data’-step (here: Get new RN)
- Fill the Index data (here: Document Number) using an arithmetic expression
GV_oldRN + 1
The condition
- Add a new ‘Condition’-Step (here: Condition_Client 1)
- Set it up as follows:
Note: If the value of the company is always written in the same way (uppercase, lowercase, etc.) you will not need the UCASE()
- Add 2 new ‘Assign Data’ - Steps
- Assign additional information to the invoice number
Example:
Result
In the end it all should look like follows: