Add invoice number

How can I place an invoice numbering within a PDF that I generate with Connect whose data source is another PDF? This should be increased so that for each PDF that enters the invoice number should be increased by one unit, for example, the first bill we generate is going to be 001-002-0000001, the second will be 001-002-0000002 , the third 001-002-0000003 and so on, this so that the numbers never repeat themselves.

Would there be a way to do this with Connect? Currently we already do something similar but with CSV files, in this case our input is a PDF file, so the query.

Thank you very much.

Hi Hugo,

See below basic sample that you can build onto.

Download

Regards,

S

Hi, if you need to have one different invoice number per record, Sharne’s sample is fine.

If you need to have one invoice number per PDF input file, I would suggest you to increment a global variable in the Workflow thanks to the “mathematical operation” process. Then put this value in a job info and you can use it thanks to the automation.jobInfos. The problem with this solution would be when you restart services, the value will be reset.

Hello Yann,

The information of the invoice numbering we need to be able to save it and restart in case the server is restarted (due to lack of power or automatic updates) for this we can save the numbering in some file either txt or csv or in a database? So that we can consume this every time a new PDF is entered.

Use the Data Repository to persist a value, which you can read, increment, and store every time a process runs. It will persist across jobs and server reboots. Read it into a Watch Variable, and access it via the “automation variables” mechanism in your Data Map.