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:
The variables
- DocID – Type Integer
- oldDocID – Type Integer
- oldRN – Type Integer
- Client – Type Text
Fill the variables as follows:
- Create a new ‘Assign Data’-step (here: Get Values)
- Fill variable ‘DocID’ and ‘Client’ with the corresponding indexvalues
- Create a new ‘Assign Data’-step (here: Get Old DocID)
- Fill the variable ‘oldDocID’ with a value from a file cabinet
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: