Avatar

Correct answer by
Level 10

I think this is what you are after. I moved the logic to the calculate event of the target date and added a numeric field to hold the result of adding/subtracting (called 'delta').

// form1.#subform[0].date2::calculate - (FormCalc, client)

var date1 = Date2Num(date1.formattedValue,"MM/DD/YYYY")

$.rawValue = Num2Date(date1+days+delta,"MM/DD/YYYY")

Untitled.png

You could make 'delta' hidden.

Steve

View solution in original post