Select to view content in your preferred language

Search App - Flex Viewer 2.5

3200
15
Jump to solution
08-15-2014 12:30 PM
SeanGambrel
Deactivated User

Hi all,

I'm having trouble with the out-of-the-box Search Widget for Flexviewer 2.5.  We are still running server 9.31.  (Yes, I know its old, we're due for an upgrade soon).

This particular viewer has been up and running fine for several years, but recently we made some structural changes to a joined table that is used by the search widget and have been having trouble ever since.  I'm getting the "400 fault code; check your parameters" message.  I've checked, double checked, and triple checked everything that I can think to, and done quite a bit tinkering but can't get the widget to perform properly.  I've called ESRI support but this is all retired stuff, so they're of limited help.

Here are the highlights:

  • Both the table and the geometry are in SDE.  The user profile that the mapservice was built with has the appropriate permissions to use both.
  • Attribute data from the joined table can be accessed using the Identify Widget in the Flex Viewer, so it seems the join functions and the field names are correct.
  • Similarly, if I open the mapservice as a layer in desktop, I am able to successfully query the layer and the joined table.
  • There are two search "layers", which actually point at the same layer, but two different field.  One field is from the joined table and one is from the polygon geometry.  Neither work.
  • I can change other parameters in the widget and they are reflected in the flexviewer.
  • When I try to query the layer in the API interface using the 1=1 trick, I receive the message "Unable to perform query. Please check your parameters."
  • The search widget is able to query other mapservices though I've only tested with unjoined layers.

Here is the URL for the viewer:

http://gis.bangormaine.gov/parcelviewer/


Here is the URL for the layer in the mapservice:

Parcels - ParcelLines-Dynamic


Here is the code for the widget.  I was a little unsure whether or not the full field name needed to be used, so you'll see the top "layer" uses just the actual field name and the second layer uses the full SDE name.  Neither works at this point.

<configuration label="Parcel Finder">

    <initialview>text</initialview>

<layers>

<layer>

        <name>By Address</name>

        <url>http://gis.bangormaine.gov/ArcGIS/rest/services/ParcelLines-Dynamic/MapServer/0</url>

        <expression>gisdata.GISADMIN.PARCELDATA.PROP_ADD like '%[value]%'</expression>

        <textsearchlabel> [Example: 123 MAIN ST]</textsearchlabel>

        <titlefield>PROP_ADD</titlefield>

        <linkfield></linkfield>

        <fields all="true">

            <field name="PROP_ADD" alias="Address"/>

             <field name="OWNER1" alias="Owner"/>

             <field name="MAPLOTUNIT" alias="Map-Lot Number"/>

             <field name="TAX_ACCT" alias="Account"/>

        </fields>

    </layer>

<layer>

        <name>by Map-Lot Number</name>

        <url>http://gis.bangormaine.gov/ArcGIS/rest/services/ParcelLines-Dynamic/MapServer/0</url>

        <expression>MAPLOTUNIT = '[value]'</expression>

        <textsearchlabel>[Example: 001-001-A]</textsearchlabel>

        <titlefield>MAPLOTUNIT</titlefield>

        <linkfield></linkfield>

        <fields all="false">

            <field name="gisdata.GISADMIN.PARCELDATA.PROP_ADD" alias="Address"/>

             <field name="gisdata.GISADMIN.PARCELDATA.OWNER1" alias="Owner"/>

             <field name="gisdata.GISADMIN.Parcels.MAPLOTUNIT" alias="Map-Lot Number"/>

             <field name="gisdata.GISADMIN.Parcels.TAX_ACCT" alias="Account"/>

        </fields>

    </layer>

</layers>

<labels>

      <graphicalsearchlabel>Identify Parcels</graphicalsearchlabel>

      <textsearchlabel>Search for Parcels</textsearchlabel>

</labels>

<symbols>

      <simplefillsymbol color="0xFF0000" alpha="0.0"/>

      <outline color="0xFF0000"alpha="1.0" width="5"/>

</symbols>

<zoomscale>9600</zoomscale>

</configuration>

0 Kudos
15 Replies
RobertScheitlin__GISP
MVP Emeritus

Did you clear you browsers cache?

SeanGambrel
Deactivated User

Yes, Cleared both the REST API cache and my browser's cache.  Problem persists.  Weird.

When I search using the map-lot number field it only returns one matching result.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sean,

   When I go to the your sites link the By Address search still has fields all="true"

SeanGambrel
Deactivated User

Sorry, where do you mean exactly?

I have been fiddling around with the widget's XML back and forth a bit throughout the day, trying (most likely re-trying) different combinations of variables.  So perhaps you're just catching it then?  Or maybe I'm missing something?

It should be set back to false now.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sean,

   After further testing it seems that if your query includes geometry than you get the 500 records and if your do not query with geometry than you get the correct result amount. This is a ArcGIS Server issue as I can reproduce this at the Rest Service end point.

SeanGambrel
Deactivated User

Hmmm.  That sounds like something I'm really not equipped to remedy.  My abilities with server are fairly limited.      

Unless you have other suggestions, I'll give tech support another try - though they're pretty hesitant to assist with 9.x.

Thank you for your help.  Worst case, this just has to function like this until we complete our server upgrade in the relatively near future.

Again, Thank you Robert.   

0 Kudos