Hello fine folks of the Geonet boards. Finally dipping my toes into advanced formatting by way of Arcade within the Dashboard, List widget > Advanced formatting. I've made some progress understanding the syntax and getting some customization proof of concept testing (successful) to change background colors based on a status field. This article was great.
var color = Decode($datapoint["status"],
'Tentative', 'lightgreen',
'In-Progress','orange',
'')
return {
textColor: '',
backgroundColor: color,
separatorColor:'',
selectionColor: '',
selectionTextColor: '',
// attributes: {
// attribute1: '',
// attribute2: ''
// }
}
But now I'm looking for examples, advice etc. to getting to the next step, which is to color the background based on some date fields and logic. Essentially replicating the filter, I have enabled on the data options tab to display records where Date field1 is within xyz days OR datefield1 is before today AND date field2 IS NULL.
-One color if Date field1 is WITHIN xyz DAYS
OR
-Second color if date field1 is BEFORE NOW AND date field 2 IS NULL