1 Reply Latest reply on Feb 11, 2015 10:57 AM by M1A6

    Creating a script for Date Field

    M1A6

      Example.PNG

       

      Hello,

       

      I am new to Adobe Live Cycle and I am struggling with creating an action that will populate multiple fields.

       

      Example

       

      I have a Report Date 1FEB and 3 FEB End Date

       

      Day 1 1FEB

      Day 2 2FEB

      Day 3 3FEB

       

      I would like the user to be able to select the report date and day 1, 2, 3 etc will auto populate with the report date +1+2+3

        • 1. Re: Creating a script for Date Field
          M1A6 Level 1

          So I figured it out on my own.  Posting for anybody that might be looking for the same thing..

           

          Table1[0].Row1[0].Date1.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM D, YYYY") +0, "MMM D, YYYY")

          Table1[1].Row1[0].Date2.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM D, YYYY") +1, "MMM D, YYYY")

          Table1[2].Row1[0].Date3.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM D, YYYY") +2, "MMM D, YYYY")

          Table1[3].Row1[0].Date4.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM D, YYYY") +3, "MMM D, YYYY")

          Table1[4].Row1[0].Date5.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM D, YYYY") +4, "MMM D, YYYY")

          Table1[5].Row1[0].Date6.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM D, YYYY") +5, "MMM D, YYYY")

          Table1[6].Row1[0].Date7.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM D, YYYY") +6, "MMM D, YYYY")