Select to view content in your preferred language

Search Widget Not Working

4080
17
12-10-2010 05:07 AM
MarkSmith1
Deactivated User
Hello,

I'm trying to configure a search widget to work with my operational data and I'm getting this error:

[RPC Fault faultString="Unable to complete operation." faultCode="400" faultDetail="Unable to complete Query operation."]

Here's my configuration for the search widget:

        <layer>
            <name>LegacySites</name>
            <url>http://dcc-gis/ArcGIS/rest/services/LegacySites/MapServer/0</url>
            <expression>LegacySite = '[value]'</expression>
            <textsearchlabel>Search by Legacy Site ID  [ Example: MB900-020 ]:</textsearchlabel>
            <graphicalsearchlabel>Use one of the graphical search tools to select Legacy Sites</graphicalsearchlabel>
            <titlefield>SiteName</titlefield>
            <linkfield></linkfield>
            <fields all="true">
                <field name="LegacySite"/>
            </fields>
        </layer>

One question: for the field names should I specify the actual field name of the alias?

Thanks,
Mark
Tags (2)
0 Kudos
17 Replies
RobertScheitlin__GISP
MVP Emeritus
Mark,

   You should use actual field names and if you have a join on that layer than you need to use the full name with the join info. Also do you have the OBJECTID and Shape fields visible for that layer in your MXD?
0 Kudos
MarkSmith1
Deactivated User
Thanks Robert. That seems to have been the problem (I also cleared the REST cache which seemed to resolve some inconsistencies between the layer name I was using and what the service had).

Cheers!

Mark
0 Kudos
EmilyLaMunyon
Deactivated User
I am having the same problem, but am unable to resolve it. My search widget is not working on a joined map service layer. I have tried typing the full field name with no luck, I have also tried using various fields for the query. Will the search widget be affected if the join is to a SQL table through an ODBC connection?

<layer>
            <name>Survey Number</name>
            <url>http://gis.slco.org/wwwrest/services/public/Surveyor/MapServer/1</url>
            <expression>surveyor.SLCOSU.Surveys.DOCUMENT_N LIKE'%[value]%'</expression>
            <textsearchlabel>Search by Document Number:</textsearchlabel>
            <graphicalsearchlabel>Use one of the graphical search tools to select</graphicalsearchlabel>
            <titlefield>surveyor.SLCOSU.Surveys.DOCUMENT_N</titlefield>
            <linkfield></linkfield>
            <fields all="false">
                <field name="surveyor.SLCOSU.Surveys.DOCUMENT_N" alias="Survey Number"/>
    </fields>
        </layer>

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Emily,

   I don't see the shape field or ObjectID of the main feature class as being visible, looks like only the joined data has those fields visible?..
0 Kudos
EmilyLaMunyon
Deactivated User
Thanks for replying Robert.

I am not sure what happend to my service, but the joined, or first 4 in the rest layer are the original fields that I joined to a SQL table. It seems like those should have retained the original names and the rest (SQL fields) should have the joined names. Do you think this is the reason the search is not working?
Emily
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Emily,

   Looks like the opposite of what you want is what you published. I would try again and make sure you add the table join to the featureclass. The join issue is definitely your problem with the search widget though, because you can not even do a query from the REST services directory on that layer without error.
0 Kudos
EmilyLaMunyon
Deactivated User
I am joining the table to the feature class (not the other way around) and have retried the join several times with the same result. I am not sure what to do differently. Do you think it is a problem with the way the service is reading the layer? Have you ever seen this before?

As always, thanks!

Emily
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Emily,

   I have not seen this issue before and would suggest a call to esri tech support.

Robert
0 Kudos
RocíoVega
Deactivated User
Hi Robert,
I want to thank you for all your help people like me who are not developers but we want to improve our applications.
I going to bother you with a question
1. I configured the esearch widget with an information layer (Parcels) having several classes relationship. I just need to display information from two of these relationships. Additionally,  in this layer I set up a search for an attribute that is in a related table for which I created a join and I have kept in the mxd map service. When I have the join on the map does not show the relationships and get a message that says "no results for this search", if I delete the join if it shows the related tables but could not do my query.
No way to fix this?

I would greatly appreciate if you can guide me to a solution.

Sincerely,
Sorry for my english....

dew
0 Kudos