Using Arc Desktop 10.3.1 and AGOnline, I have a polygon feature class showing different service zones and the dates of last service. I would like to symbolize this using a time from now, ie if it has been more than 1 month since last service date it will be yellow, if it has been more than 2 months it will be orange, etc… Is there a way to put an expression into the symbology like
if (now) - [last date] > 30 & < 60 then yellow
if (now) - [last date] < 90 & > 60 then orange
This map will ultimately be used in an ArcGIS Online web map, so it has to be dynamic and constanly updating.
Here is a solution assuming your feature class is in a file geodatabase. I don't know how to do it using ArcGIS Online. I'm assuming there will be a way similar to what I'm about to propose.
I don't see a way to do this using symbology all by itself. However, you can create several instances for each of the expressions that you need and put a different definition query on each layer.
Fortunately, file geodatabases support CURRENT_TIMESTAMP. You can put a definition query like the following on each of your layers:
(CURRENT_TIMESTAMP - LastDate) >= 30 AND (CURRENT_TIMESTAMP - LastDate) < 60
And another one like this:
(CURRENT_TIMESTAMP - LastDate) >= 60 AND (CURRENT_TIMESTAMP - LastDate) < 90
Repeat for however many expressions you need. Set the symbology appropriately. This should change dynamically.
*note, I included the
>=symbol rather than just
>to include the lower limit.