Avatar

Level 10

Hi,

I suspect that you are not using the full LC Enterprise Suite (???). If you were, you could set up a workflow to keep track of the current order number.

If you are using a standalone form, then you could have the following script in  the docReady event of the order number object:

this.rawValue +=1; 

This will work if the Works Order number object is a numeric field.

The += tells Acrobat to take the current value of the field and add 1 to it. It is the exact same as:

this.rawValue = this.rawValue + 1; 

This will only work if you always open the last Works Order and then input the new details. If multiple people open the form, then the numbering could get out of order.

The more robust way would be to use a database to keep track of the Works Order numbers, but this will require a bit more work.

Hope that helps,

Niall