InfoPath rule based repeating section date validation

A question was asked in the SharePoint 2010 Infopath forums:

"I am using Infopath2010 and developing a form where there are multiple sections. In each section I have a from date and to date controls.My requirement is to takecare the same date range should not fall in anyother sections."

I went crazy and decided to took on the challenge, I started with 2 tips:

 

The result:

image

The XSN template is here:

https://static1.squarespace.com/static/5527bff2e4b0b430660b0d10/5527c30de4b030eeeef09715/5527c30fe4b030eeeef09e86/1304524623397/ChainingDates.xsn

 

Summary Steps

  1. Use DateDiff - calculate date difference between Begin & Epoch
  2. Again for End & Epoch
  3. Use Preceding rule to calculate max date difference in previous "End From Epoch"
  4. Validation rules kick off when datediff for the current section is less than the max from previous section

Have fun!