i know absolutely nothing about java so be patient with me.
i have created a pdf work order that i would like to have generate a new work order number each time i open it.
i dont know where to start from . i have found some script examples but i dont know how to implement or place it to have the result show where i want it on the document.
any help would be greatly appreciated
You can do it using a text field and a script.
What code did you find?
this is the script i found, but having absolutely no knowledge of any kind of computer programming i dont even know where to input or how to do it.
trying to learn and do
thanks for the help and understanding
var f = this.getField("Tracking Number");
if (f.value=="") f.value = "0001";
else f.value = util.printf("%04d", (Number(f.value)+1));
i have entered as you suggested but i am not getting any results.i have included images ,
lol. guilty of overlooking the simple because i convinced myself the answer was complex.
thank you for your help
Hi, I have a question, I have entered the code and it works. However, when you click on the number it rolls. Even after saving the form the number rolls as well. How do I keep the form number from rolling when the number is clicked on and after it is saved?
The trick to solving a programming issue is to think through how you want it to work, write down the exact steps that are need to accomplish it, then ask us for suggestions on how to implement it.
The code presented here is designed to run each time the form is opened. If you want something different, the tell us how you want it to work.
Can you tell me how to edit this script to generate the new number upon printing? Currently it changes on saving and opening.
var f = this.getField("Tracking Number");if (f.value=="") f.value = "0001";else f.value = util.printf("%04d", (Number(f.value)+1));
Perfect! Thank you for your prompt assistance.