Select to view content in your preferred language

Map Viewer Date Filter: Add "is or is after Today" for ArcGIS Enterprise

170
2
4 weeks ago
Status: Open
asainz
by
Emerging Contributor

I recently received a request from a user group in my organization to filter data in a web map where the Date Resolved value is or is after Today. I was unable to find this filter expression for date fields in the new ArcGIS Map Viewer. 

For clarification, description and screenshots provided for this Idea are based on current limitations verified in ArcGIS Enterprise 11.3.

Upvotes are appreciated to get the attention of the Esri Product Development team on this one. 😀

The requested date field filter is available in ArcGIS Dashboards and Experience Builder. I followed up with Esri Support and verified that this filter is not available in the Map Viewer, despite availability in other ArcGIS applications. Enhancement ENH-000154234 has been logged for this functionality. It would be helpful if this filtering capability is included with the Map Viewer. 

Screenshot 1: Date filter is or is after Today available in ArcGIS Dashboards. Sample Indicator widget displayed below.

DateFilter_ArcGISDashboard_ArcGISEnterprise113.jpg

 

 

Screenshot 2: Date filter is or is after Today available in Experience Builder. Sample Filter widget displayed below.

DateFilter_ExperienceBuilder_ArcGISEnterprise113.jpg

 

Screenshot 3: Date filter is or is after Today NOT AVAILABLE in ArcGIS Enterprise Map Viewer. Sample Filter expression does not contain this specific filter. The date parameter also requires a specific date to be entered. In other words, the filter cannot be set to a relative point in time such as TodayTomorrowYesterday, etc.

DateFilterNotAvailable_MapViewer_ArcGISEnterprise113.jpg

 

My organization is 1-3 years away from upgrading ArcGIS Enterprise. I hope this makes it into a future patch for ArcGIS Enterprise 11.3.

2 Comments
DavidSolari

This would be a fantastic addition, but it's unlikely a non-critical update will make it into a previous Enterprise release. As a stopgap, you can use tools that directly manipulate Web Map definitions (such as the AGOL Assistant or the Python API) to change the filter using hand-written SQL. Something like:

date_resolved >= CURRENT_DATE

 

asainz
by

Hi David, 

I appreciate the note. This may be user error on my part, but I was unable to enter a manual expression into the filter for the date field. I wonder if this works in AGOL but not in ArcGIS Enterprise. 

Great idea to use a SQL or Arcade expression. When I click Add Expression in the Map Viewer filter prompt, I only have the option to use the Expression Builder. I do not see an option to switch to an expression or add a stand-alone expression as you would in the pop-up configuration in Map Viewer. 

For example, another user posted about a similar issue (past instead of future dates) in the Esri Community pages: https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-date-equals-today-or-ear...

 

Helpful Arcade expression here if the prompt was available: credit to @DonShawEsri for this one. 🙂

var event_time = $feature.eventTime;

var today_date = Today();
var diff = DateDiff(today_date, event_time, 'days');


if(diff > 0){
return 'before today';
}

else(diff <0)
return 'today';