In a recent app (form) I wanted to be able to quickly see the last time I had visited a site. This form had the usual Parent/Child setup with a repeatable section that noted information every time I visited the site. Having the ‘last visited date’ on the parent side of the form meant that when I mapped the data in QGIS I could quickly create a categorised thematic by this date to see which sites might need a visit.

Here is the setup

  • App with a repeatable section called ‘observations’
  • Date field on the repeatable section for observation date  – observation_date
  • Calculated field on the ‘Parent’ (non repeatable) side of the app with the following expression

var dates = REPEATABLEVALUES($observations,’observation_date’);
var maxDate;

if (dates && dates.length > 0) {
maxDate = dates[0];

dates.forEach(function(currentDate) {
if (currentDate > maxDate) {
maxDate = currentDate;
}
});

maxDate;
}

If you have a fulcrum account and you would like an example of this, drop me a line via phil@… and I will share an app with you