Select to view content in your preferred language

Enhanced Search Widget

2497
4
02-26-2013 04:15 AM
MarkYerington
Frequent Contributor
I have been having trouble getting my posts to submit, so hopefully this is not a duplicate.  I am having trouble getting the esearch widget 3.0 to return results for a relationship class in an sde geodatabase.  It is working fine on a File based Geodatabase.  I am using ArcGIS server 10.1.  I have checked inside the ArcGIS services directory and the query related records works fine there for both the file based geodatbase and the SDE geodatabase.  Both query calls in fire bug look identical, but the sde does not fill out the related records grid.

This is the relate that is not working, and I do not know why because it is identical to the File based Geodatabase.  The only thing that I can see different between the geodatabases is that the SDE geodatabase has an alias for the table name and the File based is aliased the same as the table name, but I figure since it is working correctly at the services directory it has to have something to do with the way that the fields are passed back to the data grid.
<layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Collection & Drainage Gravity Mains</name>
   <enableprintgrid>true</enableprintgrid>
   <url>http://XXXXXXX/arcgis/rest/services/Muscatine_City/MuscatineCity_Sewers/MapServer/8</url>
   <expressions>
    <expression alias="Facility ID" textsearchlabel="Facility ID:">
     <values>
      <value prompt="Example: GM7349" isvaluerequired="false"> FacilityID LIKE '%[value]%'</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select Gravity Mains</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>FacilityID</titlefield>
   <fields all="false">
    <!--field name="objectid" visible="false" /-->
    <field name="FacilityID" gridfield="true" visible="True" />
    <field name="OperationalArea" gridfield="true" gridfieldonly="true" alias="Operational Area" />
    <field name="AdministrativeArea" gridfield="true" gridfieldonly="true" alias="Owner" />
    <field name="FlowType" gridfield="true" gridfieldonly="true" alias="Flow Type" />
    <field name="OriginKnown" gridfield="true" gridfieldonly="true" alias="Origin Known" />
    <field name="LocationKnown" gridfield="true" gridfieldonly="true" alias="Location Known" />
    <field name="YearInstalled" gridfield="true" gridfieldonly="true" alias="Installation Year" />
    <field name="Material" gridfield="true" gridfieldonly="true" alias="Material" />
    <field name="MaintenanceZone" gridfield="true" gridfieldonly="true" alias="Maintenance Zone" />
    <field name="InElevation" gridfield="true" gridfieldonly="true" alias="In Elevation" />
    <field name="OutElevation" gridfield="true" gridfieldonly="true" alias="Out Elevation" />
    <field name="CrossSectionalShape" gridfield="true" gridfieldonly="true" alias="Shape of Main" />
    <field name="Diameter" gridfield="true" gridfieldonly="true" alias="Diameter" />    
    <field name="PlanReferenceNumber" gridfield="true" gridfieldonly="true" alias="Plan Reference Number" />
    <field name="Comments" gridfield="true" gridfieldonly="true" alias="Comments" />
   </fields>
   <links>
   
   </links>
   <zoomscale usegeometry="true" zoompercent="1.6" />
   <autoopendatagrid>true</autoopendatagrid>
   <relates> 
    <relate id="5" label="Gravity Main Maintenance" enableexport="true" icon="assets/images/i_Flag.png">
     <fields all="true">
      <!--field name="GravityMainID" gridfield="true" visible="True" />
      <field name="MaintenanceType" alias="Type of Maintenance" />     
      <field name="DateCompleted" alias="Date Maintenance Completed" dateformat="MM/DD/YYYY" sort="asc|1|date" />
      <field name="Length" alias="Length of Maintenance" />
      <field name="Direction" alias="Direction of Maintenance" />
      <field name="TapeNum" alias="Tape Number if CCTV" />
      <field name="RootControlMethod" alias="Root Control Method" />
      <field name="WorkDoneBy" alias="Maintenance Completed By" />
      <field name="CCTV" alias="Needs Televised" />
      <field name="Comments"/-->
     </fields>
    </relate>
   </relates>
   <queryattachments>false</queryattachments>
   <symbology>
    <simplelinesymbol color="0x00ffff" alpha="0.8" width="2" />
   </symbology>
  </layer>

Any help would be appreciated.  Also I think there is a way to get the exact version of the widget, but I cannot find where I seen that.
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Mark,

   To get the version of the eSearch widget you are using just hold down the Alt key and click on the widget title. I manly use SDE data for my stuff and the relates on my live preview site are using SDE relates... So it is likely an issue of configuration. With the information you have provided though I can't get a clear idea of where you are going wrong. I would need to see the Rest Service directory for that service. Are field names that you have configured exactly the same as they appear in your REST Service directory?
0 Kudos
MarkYerington
Frequent Contributor
Version 3.14f

I have attached the feature class fields and the relationship id image.  I believe all the fields are correct, but maybe I am missing something.  I am returning all fields from the related table just to see if I can get it working correctly.

Hopefully this is what you are asking for.  This is a dynamic map service with multiple layers, but I tried to do it with just the gravity mains in a service and same results
Thanks again
0 Kudos
MarkYerington
Frequent Contributor
This is an error that I see when I select the related record.  Don't know if this has anything to do with it.  I am waiting on my flash builder 4.6 to arrive, so i cannot debug, I was using a trial version to get this new version rolled out, I thought I had it working since one of the relates worked.  Now we are getting ready to deploy a brand new web server and a GIS server and I come accross this and my trial version has expired.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Mark,

   I found the issue in the code it have to do with your layer having a subtype. I can fix the issue but I will not be going back to 3.1.4f and applying the fix to that version. It will only get fixed in the next release version which the current release id 3.1.10.
0 Kudos