2 Replies Latest reply on Jan 19, 2018 5:39 AM by rachelb16821056

    How do I format this code so the date only updates once (when the file name is "Template") and doesn't update once the file name has changed?

    rachelb16821056 Level 1

      I'm trying to piece together two bits of Javascript code that I found on these forums, but I'm not experienced in this at all so I keep getting an error message. This is what I have so far:


      this.addScript("init", "var f = this.getField(\"Today\") + if (this.documentFileName=="Estimate Template.pdf")) f.value = new Date();");



      What argument am I missing in this line of code?



      Thanks in advance!