Is it possible to set a filter to show outages that have yet to be completed by date? We will have a start date/time and an end date/time. I would like to hide the outages that have expired. I was thinking about creating a new yes/no field that I can filter that way, but I'd like to avoid having a user to have to go back and enter that in. I'd like to just hide the results after the completion date automatically. Can this be done?
Thanks!
here is a link to the assistant: ArcGIS Online Assistant
How have I missed this tool? Looks very useful. But how do I edit a web map json file? It doesn't let me edit it in the assistant and I don't see where I could upload one anywhere.
Also, is there a rule behind some feature services that let you filter some date fields but not others? I'm trying to set a filter on the FireOutDateTime field on this feature service:
http://irwin.doi.gov/arcgis/rest/services/Console/Incident_View/FeatureServer/0
But the date fields don't show up in the drop down of the filter interface.
Thanks for your help
So in the tool you click "I want to view JSON" and then when you click on the map item on the left and then on the right the JSON will show up for the map and there will be an edit icon in the top right corner of the JSON and that is where you can start making edits and then click save.
Ahh, thanks. I missed that. Once you start scrolling those buttons disappear.
I still don't understand where you would put the syntax within the JSON.
Where would I put the following Example within my JSON?
DATEDIFF(s,DATEADD(s,30,CreationDate),GETDATE()) < 0
Thanks
In the filter for the layer. It is probably best to create some random filter on the layer. That way the filter parameter is part of the json of the layer in the webmap. Then use the AGO Assistant to replace the random filter with the one you want.
Just remember the following:
1: The date syntax is database dependent
2: This is considered a non standard query, so you need to make sure you server supports non standard queries
Thanks, that did it. By creating a random filter, it placed the JSON syntax I needed in order to edit the query. This has been very useful, thanks.
Hi Michael,
what's happening for ago-assistant, The login button is always disabled. will ESRI continue the develop of this great tool?
Thanks.
The log in is working for me. I am not sure why it is not for you. As for the support, I am not sure.
Here is the code if you are interested.
Thanks Michael.
I see some errors in my browser console, so I will report it as issues in Github.
Cheers