1 Reply Latest reply on Aug 16, 2011 8:54 AM by George_Johnson

    Batch Process a Text Field

    JenniferE33

      I am very new to the world of java script.  I work in a regulated environment and what I need is to create a batch process to do the following:

       

      1.  Print a text field at the bottom of each page that is only visible when printed.  The field is necessary so that when the pdf is printed, it should state that it expires on the current date (DD-MMM-YYYY format) at 23:59 pm

       

      I know how to do this to an individual PDF, but I have not figured out how to apply it as a batch process.  The script I use for the individual text field in order to print out the following: Printed on Aug 16, 2011 - Expires on 16 Aug 2011 23:59 pm

       

      //this.calculate=false;

      //this.getfield("expiration").defaultvalue='Printed on: ' + util.printd("dd mmm yyyy", next date()) //+ ' Expires on: ' + util.printd("dd mmm yyyy", next date()) + ' 23:59 pm';

      //this.getfield("expiration").value = this.getfield("expiration").defaultvalue;

      //this.calculate=true;

       

      this.calculate = false;

      this.getField("expiration").defaultValue = 'Printed on: ' + util.printd("mmm dd, yyyy", new Date()) + ' - Expires on ' + util.printd("dd mmm yyyy", new Date()) + ' 23:59 pm';

      this.getField("expiration").value = this.getField("expiration").defaultValue;

      this.calculate = true;

       

      If anyone could help, I would greatly appreciate it!