1 person found this helpful
Tough problem, especially on the iPad.
Next, write the script on the regular Acrobat Pro on your desktop.
if(1 == app.alert("increment?",2,1))
this.getField("Agreement").value = this.getField("Agreement").value + 1;
Put this in a document script and test it out. If it works for you on the desktop, try it on the iPad with the two PDF viewers I've mentioned above. If it works, then you have something.
However, you may find this technique problematic, but cause it's all on the client. There is no way to know if the number hasn't already been used, or if a number is skipped. This is especially true if there is more than one iPad doing the submit.
A much better methodology is to use a "presubmit", to the server script that is doing the form processing, and have it search the DB and return an FDF with the correct next number. Only the Readdle Viewer can do this.
Alternatively you can use a psuedo random number generator to create unique IDs. Then all these other issues go away.
Thanks for your detailed and thorough answer, it's much appreciated! I may just have to use the increment option for the time being, unfortunately random numbers is not an option as all our agreements are number chronologically and allow for multiple locations of the same order such as "25567A", "25567/b" and "25567C", as well as second year orders for the same client which have a 1 prefix, for example "125567".
I understand that this is making the whole question more and more complicated.
Could you give me any more basic information regarding the presubmit to the server? What would the company I work for need for this? An online server of sorts that could be accessed by submitting document via email? Sorry for my obvious lack of knowledge regarding servers!
The app we're using on the iPads is indeed Readdle PDF Expert, which I concur has the best capabilities by far.
We're going for a unique pseudo random number. Many thanks for your help! Have a great day,