eSearch widget fails to display results, xml syntax error ?

2936
11
Jump to solution
11-05-2014 07:37 AM
DorotheaKnigge
New Contributor III

I am using ArcGIS Viewer for Flex Application Builder version 3.6 with  build date 2013-12-13.  The eSearch (version 3.6.1) widget in my Collision Application is not throwing errors but fails to display results.  I can tab through the "text", "spatial", and "graphic" options but basically it locks up the application. Could someone help get me back on track?  I have included the eSearch xml and a graphic of the "results" page.  The "results" page does show the number of selected features.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Dorothea,

  OK so you are just querying numbers then. So the only issue I see is a syntax issue in your XML. You are missing whitespace between your alias attribute and your sort attribute in the COL_Date field tag:

incorrect (syntax error):

<field name="COL_DATE" gridfield="true" alias="COLLISION DATE"sort="asc|1|numeric"/>

Correct:

<field name="COL_DATE" gridfield="true" alias="COLLISION DATE" sort="asc|1|numeric"/>

View solution in original post

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus

Dorothea,

    Do any of the searches work or is it just one that has the issue? I notice that in the url you have "arcgissecure" does that mean that these map service layers are secured? If so then are you getting the secure login prompt when querying these layers, since you do not have a token defined for them?

0 Kudos
DorotheaKnigge
New Contributor III

The "arcgissecure" is part of our internal user Authentication.  This Flexviewer  app is not public facing.

The portion that is working: searching the  'Route Centerline' by a road name,  switching to 'Spatial Search'  and applying  a search distance of 10' to catch any collisions not snapped to road, then search entities of 'Collisions' and using  search option 'add to selection' and then clicking 'Entirely contained in' will select all the collisions on that road. The date range search section appears to need help.

Col_view1.png

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Dorothea,

   OK that helps narrow things down a lot. So first question. Is COL_DATE field an actual Date field type?

0 Kudos
DorotheaKnigge
New Contributor III

Ok, I see where that may be a problem.  The 'COL_DATE' and 'COL_YEAR ' both have a Data Type of LONG.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Dorothea,

  Here is an example that I have for querying a true date field:

                <expression alias="Incident date" textsearchlabel="Search Incidents on or after date:">

                    <values>

                        <value prompt="Example: 2012/04/16">datetime >= '[value] 00:00:00'</value>

                    </values>

                </expression>

0 Kudos
DorotheaKnigge
New Contributor III

You wouldn't have  a method for using 'LONG' fields, would you?

How would you go about  making this work?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Dorothea,

   So you are saying that your COL_DATE field is a long? I can not say I have ever heard of anyone doing that. So what do values in that field look like then?

0 Kudos
DorotheaKnigge
New Contributor III

It stems from quite a few years back.  We started to maintain a database of all collisions within the County by in-put from hard-copy reports from the CHP.  We found our records were much more accurate than SWITERS data.Col_view2.png

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Dorothea,

  OK so you are just querying numbers then. So the only issue I see is a syntax issue in your XML. You are missing whitespace between your alias attribute and your sort attribute in the COL_Date field tag:

incorrect (syntax error):

<field name="COL_DATE" gridfield="true" alias="COLLISION DATE"sort="asc|1|numeric"/>

Correct:

<field name="COL_DATE" gridfield="true" alias="COLLISION DATE" sort="asc|1|numeric"/>

0 Kudos