Expand my Community achievements bar.

SOLVED

add-days-to-date throwing error in formcalc

Avatar

Level 3

   I am receiving an error of Error: Accessor 'add' is unknow.

Any help is much appreciated.

Justin    

1 Accepted Solution

Avatar

Correct answer by
Level 10

Umm,

I think you did overlooked that this example is an XPath method for LiveCycle Workbench ES2 which has nothing to do with calculation scripts in LiveCycle Designer.

View solution in original post

5 Replies

Avatar

Level 10

Hi,

please provide the script you use.

Avatar

Level 3

 

form1.page2.invoiceTable.row1.boosterDate1.rawValue = add-days-to-date(form1.page2.page2Date,4)

The form1.page2.page2Date is copying a cell that has:

$.rawValue = num2date(Date(), "MM/DD/YYYY")

I'm not sure where I'm going wrong here.  I've also tried using javascript and can't get that to work either.  I am trying to take a date and add days to it dynamically.  So user selects "weeks" from a dropdown and "years" from a dropdown and from that point I want to add that amount of days to today's date.  I can get the math to work but for the life of me I can't figure out how to make the Date() function work to add some days to it.

Justin

Avatar

Level 10

What does this part in your script mean? Is this a function you try to invoke? Makes no sense to me and it's the reason you script fails.

add-days-to-date(form1.page2.page2Date,4)

Avatar

Correct answer by
Level 10

Umm,

I think you did overlooked that this example is an XPath method for LiveCycle Workbench ES2 which has nothing to do with calculation scripts in LiveCycle Designer.