Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding Prepopulated dates to a HeaderRow

Level 4
Level 4

I am having problems adding some prepopulated dates to the HeadRow of a Table. Is there somewhere for me to post my form for assistance?

0 Replies
Level 3
Level 3

could you describe your problem in a little more detail?

Are you trying to populate these dates with scripts? Where are the dates coming from?

Level 4
Level 4

Dates populate fine without them being in the HeaderRow it is not until I put them into the HeaderRow that it becomes a problem

Below is the code: ( the are named - Dates[0] Dates[1] Dates[2] Dates[3] Dates[4] Dates[5] Dates[6] etc. - dates span a two week period)



if (event.changeEx != "" && event.changeEx != "Pay Period") {





strSelection = this.formattedValue;


strStartDate = strSelection.substr(3,10);


//Create a new Date object for startDate


startDate = new Date(strStartDate);

//populate Day 1 note that the month is return as a value between 0-11 so we must add 1 to it to get the right month


= (parseInt(startDate.getMonth()) + 1) + "/" + startDate.getDate();

//create a constant that represents 1 day in milliseconds


oneDay = 24*60*60*1000;


(i=1; i<14; i++){

//get the current date as a number of milliseconds and add one day to it

//app.alert("Before adding a day: " + (parseInt(startDate.getMonth()) + 1) + "/" + startDate.getDate());

//app.alert("the number of seconds is: " + (startDate.getTime()/1000));

var startDateMS = startDate.getTime() + oneDay;

//app.alert("After - the number of seconds is: " + (startDateMS/1000));

//set the new date to the var startDate


//app.alert("After adding a day: " + (parseInt(startDate.getMonth()) + 1) + "/" + startDate.getDate());

//set the month and day into the appropriate field


+ i + "]").rawValue = (parseInt(startDate.getMonth()) + 1) + "/" + startDate.getDate();