Validating Dates Based on Previous Row



Have a dynamic table and am trying to validate the current row's date field (DateTimeField1 for i) against the previous row's date field (DateTimeField2 for i-1) and an event start date with a fixed field (PStart_Date). 

var rowCountY = this.resolveNodes("RowX[*]");

for (var i=0; i < rowCountY.length; i++)


if ((PBE.Page2.SubFormEcho.SubformCharlie.TableA.RowX.DateTimeField1.rawValue >= PBE.Page1.ProjectInfoSubform.Table3.Row3A.PStart_Date.rawValue) && (PBE.Page2.SubFormEcho.SubformCharlie.TableA.RowX.DateTimeField1.item(i).rawValue >= PBE.Page2.SubFormEcho.SubformCharlie.TableA.RowX.DateTimeField2.item(i-1).rawValue))

        {this.rawValue = this.rawValue



{"The check-in date must be greater than the previous check-out date and the check-in date cannot be before the event start date.";

this.rawValue = ""



Thanks in advance for any help!

Accepted Solutions (0)

Answers (0)