Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Creating a script for Date Field

Avatar

Level 1

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 Reply

Avatar

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")