I am trying to have symbology for a pesticide treatment automatically change after 6 days from the application. how would I go about doing this? I would like it to be visible to field workers in collector as well as AGOL.
Solved! Go to Solution.
Tim,
You could try symbolizing the map using Arcade expression. (note: arcade expressions are not supported in Classic Collector).
Something like this.
In this example the creation date is used, but you could use last edited date, if you process is to just keep the attribute up to date for areas that have had treatments applied.
var time1 = Date($feature["created_date"])
if(DateDiff(Now(), time1, 'hours')<=1){
Var Status = "New";
}
else if(DateDiff(Today(), time1, 'days')>=0){
var Status = "Old";
}
else{
var Status = "Current";
}
return Status
Mark
No since dynamic symbol would be too slow. What about having the layers in the map twice with a filter?
Tim,
You could try symbolizing the map using Arcade expression. (note: arcade expressions are not supported in Classic Collector).
Something like this.
In this example the creation date is used, but you could use last edited date, if you process is to just keep the attribute up to date for areas that have had treatments applied.
var time1 = Date($feature["created_date"])
if(DateDiff(Now(), time1, 'hours')<=1){
Var Status = "New";
}
else if(DateDiff(Today(), time1, 'days')>=0){
var Status = "Old";
}
else{
var Status = "Current";
}
return Status
Mark
Thanks for the response. It helped a ton!
This post was amazing solution for what I was banging my head for a while. Thank you Mark! And thanks AGMAD for raising this post.