Hi,
I am pretty new at arcade so I have been struggling with this problem for a bit here.
I am trying to write arcade for a conditional visualization where every Monday at 12:01 AM all of the trash bin points will reset to turn orange. They should remain orange until the bin is serviced. After the bin is serviced it turns green and starts a counter for 48 hours. If the bin is not serviced in 48 hours, it turns orange again.
I have code that works for the second part but not the defaulting to orange every Monday morning. I am trying to use ISOWeekday to call the day of the week ("1") and the Hour ("0"), but I cant figure out how to write this so it works.
Thanks in advance.
Var Enhanced1 = Date($feature["Date"])
if(DateDiff(Now(), Enhanced1, 'hours')<48){
Var Status = "Does not need Servicing";
}
if(DateDiff(Today(), Enhanced1, 'hours')>=48){
Var Status = "Needs Servicing";
}
Return Status