Specifically I am trying to change the color of my feature polygon based on its relation to today's date (if possible). The scenario is this: I am trying to track lease expirations for numerous properties. If a date from the attribute table (Lease Expiration date) is equal to or before today's date (the lease is expired) I would like the polygon color to change to black from red, green or whatever I decide it to be.
Yes, you can do this via a custom Expression in Symbology.
In the webmap, open symbology for the layer, in the attribute to symbolize, scroll all the way to the bottom of the list and create a custom expression. The custom expression could be something like this:
// Symbolize by Expired
var age
var Expired
// Difference between feature attribute and today
age = DateDiff(Now(),$feature.ExpirationDate,'days')
//Is it expired or not?
Expired = iif(age<0, 'Not Expired','Expired')
//Sybolize on this value
return Expired
That should get you close to a solution.
Jay