Find the Latest Date in a List
When you have repeated variables in your templates, you may want to find which value meets a certain condition. For example, if you have a list of revision dates, you may want to determine which date is latest.
In this example, the dialog containing a Date variable is repeated. The result of the computation is initialized with the first answer in the list, and in each subsequent repetition, if the date is greater (later) than the result, the result is set to that date. After all repetitions are processed, the result is the latest date in the list.