Select to view content in your preferred language

Road Closure How the Filter works for public view?

450
1
Jump to solution
03-29-2022 08:47 AM
RobynSnookCCB
New Contributor III

I like how the road closure ArcGIS solutions has a view created and filters only current closures. I want to apply this to another project for my organization but I can't seem to figure out how the layer is allowing to filter only current closures. 

When an active and inactive feature is present the main feature layer has all the data present in the table and viewable by transparency:

RobynSnookCCB_0-1648568327347.png

the public view layer has only the active present in the table and viewable, anything inactive disappears:

RobynSnookCCB_1-1648568440238.png

The public layer also has a filter for the active incident field but this field doesn't seem to update when adding new closures and when applied, nothing is visible. 

RobynSnookCCB_2-1648568538707.png

There is custom transparency for both layers as well but they aren't different from one another and the inactive are gone from the public layer.

So does anyone have an answer as to how the public view is filtering for active data only?

Thank you

 

0 Kudos
1 Solution

Accepted Solutions
ChrisFox
Esri Regular Contributor

@RobynSnookCCB, the solution is configured with custom filter expression on the layer in the view. This kind of expression can't be configured through the UI. The easiest way to replicate it would be use a tool like ArcGIS Assistant to edit the web map and update the "definitionExpression" of the layer to be something like below. In the example below endtime is the name of a date field in the service.

endtime IS NULL OR endtime >= CURRENT_TIMESTAMP

 

View solution in original post

1 Reply
ChrisFox
Esri Regular Contributor

@RobynSnookCCB, the solution is configured with custom filter expression on the layer in the view. This kind of expression can't be configured through the UI. The easiest way to replicate it would be use a tool like ArcGIS Assistant to edit the web map and update the "definitionExpression" of the layer to be something like below. In the example below endtime is the name of a date field in the service.

endtime IS NULL OR endtime >= CURRENT_TIMESTAMP