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>