Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Validating Dates Based on Previous Row

$
0
0

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        }
else
{
xfa.host.messageBox("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 = ""
xfa.host.setFocus(this)
}
}

 

Thanks in advance for any help!


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>