Arcade Expressions for Filtering Data in Map Viewer

884
1
01-10-2023 08:09 AM
Status: Open
BrettFrahm
Occasional Contributor II

Saw @RPGIS's idea for ArcGIS Enterprise and thought I'd add the idea to the ArcGIS Online too.

 

The ability to use Arcade expressions for filtering data in ArcGIS Online's Map Viewer would be extremely useful. We already have the ability to use arcade for symbology and pop-ups, but filtering has been left out.

A simple use-case for this would be checking to see if the CreateDate field is within the Current year. This is easily achievable with Arcade with IIF(Year(Today()) == Year($feature.CreateDate), 'YES', 'NO'). With this I could make it so my map is always showing relevant information, but instead I have to change the year on the filter manually every January. Lots of other use-cases become possible if Arcade Expressions are allowed in map viewer.

1 Comment
RPGIS
by

Hi @BrettFrahm,

I saw that you pushed my idea to Arcgis Online and wanted to let you know that there is a work around that I've implemented that works. I'm hoping that Esri can implement the idea of filtering using Arcade Expressions. The solution/work around that I currently use is a script that updates another field based on certain dates and then setting the filter widget to filter by those/other fields. I can share it if you would like. It can work for both hosted and enterprise feature services.