Select to view content in your preferred language

Web Map JSON definitionExpression/filter doesn't work in Field Maps

102
0
Tuesday
Labels (2)
ScottPool1
New Contributor

Hi,

I am creating a web map that is to be used in the field with Field Maps.

The web map needs to only include features where the startDateTime is before the current date/time and the endDateTime is after the current date/time. I.e., only allow features that are currently happening based on the start and end date/time fields.

This needs to be a filter (a symbology expression won't do as I am utilising geofences in the Field Map). Unfortunately, there is no 'out-of-the-box' functionality in web map to create this filter. Instead, I used ArcGIS Online Assistant to edit the JSON and create the definitionExpression...
"startDateTime <= CURRENT_TIMESTAMP AND endDateTime >= CURRENT_TIMESTAMP"

This works and filters the data as expected in the Web Map. The problem, however, is that this syntax for whatever reason doesn't work in the Field Maps version of the map and does not display any features at all. 

Does anyone have any ideas for a work around? Will different syntax work for Field Maps? Or is there another solution to achieving this filter that I'm unaware of?

(So far I've tried 'out-of-the-box' web map filtering, View layer filtering, creating layer from REST API with relevant parameters, web map time-slider)

Thanks

0 Replies