Hi all,
I am trying to make a dynamic symbology for a time dependent hosted feature layer. Where I have some point data and its last 15 minutes record (changes in every minute) coming from the geoevent server. This is a weather station data, I would like to turn my map symbol red if there is a rain over 50 mm for the last 15 minutes. I was planning to use arcade, tried the following code:
var rainfallField = $feature.rainfall;
// Check if the rainfall is greater than 50 mm for all records
var allRecordsAboveThreshold = true;
for (var i = 0; i < Count(rainfallField); i++) {
if (rainfallField[i] <= 50) {
allRecordsAboveThreshold = false;
break;
}
}
// Return a color based on the condition
if (allRecordsAboveThreshold) {
return "red"; // All records have rainfall > 50 mm
} else {
return "blue"; // Not all records have rainfall > 50 mm
}
But it do not give any output. Is it possible to manage it using arcade expressions?