In a recent article, I showed you how you can use the min() function, a hidden field, and formulas in InfoPath to select and display the oldest date that was selected from a date picker control in a repeating table.
You can easily change this solution to select and display the latest (newest) date that was selected from a date picker control in a repeating table.
All you would have to do is:
- Rename the minDate field to maxDate (just to keep things nice and tidy).
- Change the formula in step 13 of Selecting the minimum date in an InfoPath repeating table using formulas (no code) to:
../my:group1/my:group2/my:field1[../my:field2 = xdMath:Max(/my:myFields/my:group1/my:group2/my:field2)]
Extra tip:
The value of the latest date is stored in the maxDate field, so if your InfoPath form solution requires you to use this date elsewhere in the form, you can grab the value stored in maxDate.
And as mentioned in my previous article, this solution also works for browser-enabled InfoPath forms.

Comments to this post were closed 30 days after it was published.