I've been stepping so far away from Flex maps lately due to the Web App Builder and Javascript maps. Now I've got a map that management wants me to keep in Flex right now and add a spatial query element.
I have Council Districts (on one layer) and Incidents (each year has it's own layer). I need to create a way for Fire to query incidents by Council District. What the best widget for this?
Solved! Go to Solution.
Brian,
Is the data a true esri date field type? Is it coming from and enterprise geodatabase or etc, etc.?
ALARMDATE ( type: esriFieldTypeDate , alias: ALARMDATE , length: 36 )
Yes. It is.
Is it coming from and enterprise geodatabase or etc, etc.?
Sorry. Yes. Enterprise Geodatabase.
http://maps.cityoftulsa.org/gis/rest/services/intStarterMaps/intFire/MapServer/7
Robert, Brian,
Sorry to jump in, but is the following valid due to the greater than sign:
<value prompt="Example: 2012/04/16">datetime >= '[value] 00:00:00'</value>
should it not be:
<value prompt="Example: 2012/04/16">datetime >= '[value] 00:00:00'</value>
Regards
Anthony
Anthony,
No this time it seems to be the underlying DB type required the "date" designator
Brian,
Here is what I got working with your data:
<value prompt="1/1/2014" isvaluerequired="true" autosubmit="true">ALARMDATE >= date'[value] 00:00:00'</value>
I actually tried something that like. I was using "TRIM" in front of Value thinking that the user entry was padded maybe. and I researched someway to cast that variable to a date, I hadn't found the simple "DATE" command.
I am completely grateful, I get to add that field back in, but I have to ask. HOW.
Is this just DB experience, Flex experience, ArcGIS experience, or what? I would like to know how you got to that answer. If only so I can quit asking questions like this and just get to map making! lol
Thanks again...
Brain,
Well I start with getting the query to work in the REST endpoint. ArcGIS Dektop help has a great section about searching date fields. Once I knew the proper format for your services DB then it was simply plugging in the right SQL Statement in the xml.