Copy link to clipboard
Copied
I am using a Java Script below to randomly generate a number used for a quote number:
this.getField("Quote #").value = (Math.floor(Math.random()*Math.pow(10,13)));
It does as it should, everytime you save or close the pdf it generates a new rnadom number. Is there a way once a copy has been saved that it saves that random number that was generated? I am trying to use this for generating a quote number to keep on file but once it is saved and reopened it generates a new number.
Thanks for your help!
Use this:
if (this.getField("Quote #").value == "")
this.getField("Quote #").value = (Math.floor(Math.random()*Math.pow(10,13)));
Copy link to clipboard
Copied
Use this:
if (this.getField("Quote #").value == "")
this.getField("Quote #").value = (Math.floor(Math.random()*Math.pow(10,13)));
Copy link to clipboard
Copied
Thats exactly what I was looking for! Thanks!!