Hello! I'm using the online GIS platform and Field maps for sewer inspections. I have a "Last Inspection Date Field" and i want to symbolize to show all pipes that have an inspection dates prior to 2025 or Blank as Red, and all pipes with an inspection year during or after 2025 as green.
Can i do this using already existing symbology tools? Or do i need to write an Arcade expression to create a new field? (if the later, i will likely have more questions on how to wirte that)
Thanks!
Solved! Go to Solution.
Arcade for sure! I still consider myself a newbie with it too, so it took me a minute for everything to click. My setup is a little different—I have it categorized as: No Inspection, Inspected in the Last 3 Months, Inspected in the Last 30 Days, and Inspected More Than 3 Months Ago.
You would need to write an arcade expression in order for the symbology to change dynamically, especially for a date field.
Something like the example below should work.
var dt = $feature.InspectionDate
iif( !IsEmpty(dt) && Year(dt) < Year(Today()), 'Not Inspected', 'Inspected')
// if you plan on using multiple years
if( !IsEmpty(dt) ){
When( Year(dt) == Year(Today()), 'Current', Year(dt) == Year(Today())-1, 'Last Year', Year(dt) == Year(Today())-2, 'The Year Prior', 'Old') }
Thank you! I'm super green when it comes to writing these. I think the first example you gave me is what i need, but i don't know what i need to change to make it work for my data. Any additional info would be much appreciated!
Arcade for sure! I still consider myself a newbie with it too, so it took me a minute for everything to click. My setup is a little different—I have it categorized as: No Inspection, Inspected in the Last 3 Months, Inspected in the Last 30 Days, and Inspected More Than 3 Months Ago.