Select to view content in your preferred language

esearch 1.1.1 not able to return results

6213
22
Jump to solution
03-27-2015 09:40 AM
MarkYerington
Occasional Contributor III

I am getting the following error and the search button is not displaying in the widget.  Don't know whether this has anything to do with it.

Now I can't even do anything in the new widget since the search button is gone.

0 Kudos
22 Replies
RobertScheitlin__GISP
MVP Emeritus

Mark,

   Does your app happen to be public yet?

0 Kudos
MarkYerington
Occasional Contributor III

I attached an image, of the console error. I hope it came across. It

shows the query string, but after that throws the 400 error.

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mark,

   Unfortunately this is not enough info fro me to do anything with. Is your app public yet? If not can you download the app and send it to me?

0 Kudos
MarkYerington
Occasional Contributor III

http://magic-gis.com/error/

Its out there now. Try a 0826352026 pin search.

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mark,

  You can not combine https and http in the app. Your App URL is "http://magic-gis.com/error/" and then you use "https://magic-gis.com/arcgis/rest/services/MAGIC_Landbase/MuscatineParcels/MapServer/0" in the eSearch config.

0 Kudos
MarkYerington
Occasional Contributor III

Even when I make a request with https it still fails though.

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

0 Kudos
MarkYerington
Occasional Contributor III

An invalid where clause or definition expression has been requested:

"(Search for Parcels AND Upper(PIN) LIKE Upper('%0826352026%')) AND

(Upper(PIN) LIKE Upper('%0826352026%'))"

This is a severe error on the server. Seems like a bad query expression

is being sent.

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mark,

  OK the infamous Definition Expression strike again. You have a definitionexpression defined in your json as "Search for Parcels"

"layers": [
    {
      "name": "Parcel Search",
      "url": "http://magic-gis.com/arcgis/rest/services/MAGIC_Landbase/MuscatineParcels/MapServer/0",
      "definitionexpression": "Search for Parcels",
      "spatialsearchlayer": true,
      "zoomScale": 10000,
      "shareResult": true,
      "addToAttrib": true,
      "expressions": {
        "expression": [
          {
            "alias": "Parcel Number",
            "textsearchlabel": "Search by Parcel Number",
            "values": {
              "value": [
                {
                  "fieldObj": {
                    "name": "PIN",
                    "label": "PIN",
                    "shortType": "string",
                    "type": "esriFieldTypeString"
                  },
                  "valueObj": {
                    "value": ""
                  },
                  "prompt": "Parcel ID",
                  "textsearchhint": "Search by Parcel ID",
                  "sqltext": "Upper(PIN) LIKE Upper('%[value]%')",
                  "operation": "stringOperatorContains"
                }
              ]
            }
          }
        ]
      },
The documentation gives you this warning.
Warning:

This is an actual SQL expression that will limit the search results to the definition expressions criteria as well as the actual search SQL criteria

MarkYerington
Occasional Contributor III

Ok. Sorry for not being thorough in reading the documentation. All works

again.

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mark,

   No problem several have made this mistake that is why I put that warning in the help doc. Don't forget to mark any posts you found helpful as such.

0 Kudos