Greetings All,
I'm working on a LiveCycle Designer ES4 document that has a Week Ending Date MM-DD-YYYY (which need to always be a Saturday) selected in a subform.
I need this Week End Date to then calculate and display the selected Saturday and the previous days in a seperate subform with a table. The days need to display in seperate columns below the header.
This is what I have so far:
TopmostSubform.Page1.Requestor.WeekEndDate::exit - (FormCalc, client) var endDate = Date2Num($,"MM-DD-YYYY") var dayOfWeek = Num2Date(endDate, "E") if (dayOfWeek <> 7) then xfa.host.messageBox("Ending date must be a Saturday") $ = null xfa.host.setFocus("$") endif Page1.#subform[1].InputTable.Row1[0].Date7 = Num2Date(endDate - 0, "DD") Page1.#subform[1].InputTable.Row1[0].Date6 = Num2Date(endDate - 1, "DD") Page1.#subform[1].InputTable.Row1[0].Date5 = Num2Date(endDate - 2, "DD") Page1.#subform[1].InputTable.Row1[0].Date4 = Num2Date(endDate - 3, "DD") Page1.#subform[1].InputTable.Row1[0].Date3 = Num2Date(endDate - 4, "DD") Page1.#subform[1].InputTable.Row1[0].Date2 = Num2Date(endDate - 5, "DD") Page1.#subform[1].InputTable.Row1[0].Date1 = Num2Date(endDate - 6, "DD")
However I keep getting an error on the WeekEndDate when selecting a Saturday.
Does anyone have any idea what I'm doing wrong?
Thank you for any help!
-Michelle