Use Arcade to show Date data

02-19-2020 07:23 AM
Occasional Contributor

I have a webmap that shows survey123 data.  I want to show a time lapse map that shows today's date symbology as its normal symbols and anything prior to today's date have it display as a grey circle.  Is this possible using Arcade? 

0 Kudos
2 Replies
Esri Esteemed Contributor

Hi geniusgis , 

Yes you can. Your expression will have to check for the date and return either the original value to draw on or another standard value (for the grey circle). You mention a time lapse. Please note that if you would have a time slider, this will not influence the symbology of the expression (it just filters the features). The symbology will just check the current date with the creation date to define the symbology. Arcade has no access to the time slider setting.

0 Kudos
Esri Regular Contributor

if you don't have time slider use case, then here is a one liner that do so the job for you.

iif(DateDiff(today(), $feature.datefield, 'days') < 1, $feature.datefield, -999)


iif(today() == $feature.datefield, $feature.datefield, -999)

what kind of renderer/symbology you have for this layer?

0 Kudos