Select to view content in your preferred language

Create a flashing alert in a list in Dashboard

335
0
02-26-2024 05:58 PM
Labels (1)
Chrifwil
New Contributor

ArcGIS Dashboard/Experience Builder |

I am looking to create an arcade/script for a list in a dashboard that the background flashes when a new alert pops up. The alerts are generated from a Dataminr feed

Field: eventTime

Formate: mm/dd/yyyy, hh:mm AM/PM

Example: 2/28/2004 9:13 PM

Current code:
 
Var y = NOW();
Var z = $datapoint.eventTime

//if (z < y)

var moreThanOneMinutes;
var alert;
var alertText;

IIf(y(NOW(), z, "minutes") < 1,
moreThanOneMinutes = true,
moreThanOneMinutes = false

);

IIf(alert, alertText = 'ALERT', alertText = null);

return {
textColor: 'white',
backgroundColor: IIf(alert, 'red', '#232f3e'),
separatorColor:'',
selectionColor: '',
selectionTextColor: '#d40f0f',
attributes: {
attribute1: {alertText:alertText},
// attribute2: ''
}
}
0 Replies