Sequential numbers, Saved file name, Touch signature
Hi again community,
I have a problem with some subjects that have been brought up multiple times on these forums, but I’m the type of person who seems to be the first to encounter problems that are normally fixed easily if it were to happen to anyone else. I’ve searched online, on the Adobe forums, but either the formulas don’t work for our template or the solutions where on older Acrobats with different menu layouts and where missing one little setting…
I’m finalizing a PDF template for use as Work Orders. All I’m trying to do is the following;
Sequential Numbering – I’ve attempted the JavaScript a couple of times but can’t get it to work. I was able to make the auto date function (thanks to this forum) but not the sequential numbering. We would like to have the initials of the employee followed by a number that would go up by 1 every time the work order is completed by a submit button (signature confirmation). The work order numbers would be like this; BL-50000, BL-50001, BL-50002 and so on.
What I have attempted so far,
In text field properties:
1-
- Name – workOrderNumber
- Format – None
- Actions – Mouse up, Mouse enter, Mouse Exit
- Actions – Run JavaScript with code:
var f = this.getField("workOrderNumber");
if (f.value=="") f.value = "BL-50000";
else f.value = util.printf("%04d", (Number(f.value)+1));
2-
- Name – workOrderNumber
- Format – None
- Actions – Mouse up, Mouse enter, Mouse Exit
- Forgot which one but the only one that changed the number would change it every time I clicked the WO # field and than in a text box.
- Actions – Run JavaScript with code:
var f = this.getField("workOrderNumber");
if (f.value=="") f.value = "50000";
else f.value = util.printf("%04d", (Number(f.value)+1));
3-
- Name – workOrderNumber
- Format – Custom, Format Script with code:
var f = this.getField("workOrderNumber");
if (f.value=="") f.value = "BL-50000";
else f.value = util.printf("%04d", (Number(f.value)+1));
- Actions – Mouse up, Mouse enter, Mouse Exit
- Actions – None
Saved file name – We would like the work order number to be automatically saved as a file name. Like mentioned above, the file name would be BL-50000, BL-50001, BL-50002 once signature is confirmed.
Signature - The famous one… All we want is a signature block that the employee would click once he is done filling out the work order and have a touch pane pop up for the customer to sign his name on it either with a touch pen or a finger. Once the signature is confirmed, the PDF is saved (file name as work order number) in a specific folder and non-editable afterwards. The file can than either be printed or emailed. But the signature block only gives me my own digital signature and no other options. For our needs, our signature is useless! I read that a solution would be using the trace tool but the employees that would use these digital work orders are stuck in the 90’s and have no tech knowledge to click a multiple icons and menus in the template.
I’m trying to make filling out the template as simple as possible, clicked the blue squares to type info, click signature block, confirm and done! Hopefully this is possible. I’m still new into JavaScript myself but I do try to learn from others! If this is too complicated, is there a not too expensive software that can do this?
I’m using Acrobat Pro DC (2018) on Windows 10 Pro!
Thanks for any help, advice, inputs, etc.!
