eSearch widget with relate table question

2027
7
08-08-2012 06:23 AM
BeckyCarr
New Contributor II
When trying to run this widget I get Error #1090.  This is my first attempt with this widget and probably not understanding. 
Basically, just trying to search info from the related table. Any help is appreaciated.  Thanks.

<configuration>
  <layers>
   <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Sites</name>
   <url>http://ngnha7-gis-01/ArcGIS/rest/services/Real_Property/Projects/MapServer/0</url>
   <expressions>
    <expression alias="Site Name" textsearchlabel="Search by Site Name:">
     <values>
      <value prompt="Example: BERLIN" field="feat_name"</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select Site</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>Name</titlefield>
   <fields all="false">
    <field name="feat_name" gridfield="true" />
    <field name="instln_id" gridfield="true" />
   </fields>
   <links>
   </links>
   <zoomscale usegeometry="true" zoompercent="1.6" />
   <autoopendatagrid>true</autoopendatagrid>
   <relates>
    <relate id="0"label="Projects" enableexport="true" icon="assets/images/i_hydro.png">
     <fields all="true">    
    </relate>
   </relates>
   <zoomscale usegeometry="true" zoompercent="2"></zoomscale>
   <autoopendatagrid>true</autoopendatagrid>
   </layer>
  </layers>
   <zoomscale usegeometry="true" zoompercent="2"></zoomscale> 
<tables><!-- This section is ONLY for tables (i.e. data that has no geometry)! -->
  <table>
   <definitionexpression></definitionexpression>
   <enableexport></enableexport>
   <name></name>
   <url></url>
   <expressions>
    <expression </expression>
   </expressions>
   <titlefield></titlefield>
   <fields </fields>
   <links>
   </links>
   <queryattachments></queryattachments>
  </table>
</tables>
<keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>
<autozoomtoresults>true</autozoomtoresults>
<enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
<tolerancebydefault>false</tolerancebydefault>
<spatialreference>102003</spatialreference>
<zoomscale>2400</zoomscale>
<geometryservice>http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
<csvseparator>,</csvseparator>
<disablebuttons></disablebuttons><!--possible values one or more not all four search types comma separated text,graphic,spatial,grid,datagrid -->
<defaultselectionoption>textInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->
<enabledrawgraphicbutton>true</enabledrawgraphicbutton>
<enablebuffergraphicbutton>true</enablebuffergraphicbutton>
<selectedgraphicaltool></selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
<multipartgraphicsearch>true</multipartgraphicsearch>
<floatorfixed>fixed</floatorfixed><!-- possible values are fixed and float -->
<relatetooltip>Show Relates</relatetooltip>
<relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
<labels>
  <bufferusergraphics>Buffer Graphic</bufferusergraphics>
  <norelatesfound>No related features found for: </norelatesfound>
  <norelatesfoundalerttitle>No Results</norelatesfoundalerttitle>
  <addtolerance>Add search tolerance to point selection</addtolerance>
  <existingdrawgraphicslabel>Use Existing eDraw Widget Graphics</existingdrawgraphicslabel>
  <existingbuffergraphicslabel>Use Existing Point Buffer Widget Graphics</existingbuffergraphicslabel>
  <graphicalsearchlabel>Graphical Search</graphicalsearchlabel>
  <textsearchlabel>Text Search</textsearchlabel>
  <resultslabel>Results</resultslabel>
  <layerlabel>Search Layer:</layerlabel>
  <layerfieldlabel>Search Layer Field:</layerfieldlabel>
  <nolayerlabel>No search layer defined.</nolayerlabel>
  <submitlabel>Search</submitlabel>
  <pointlabel>Select by Point</pointlabel>
  <linelabel>Select by Line</linelabel>
  <rectanglelabel>Select by Rectangle</rectanglelabel>
  <polygonlabel>Select by Polygon</polygonlabel>
  <clearlabel>Clear</clearlabel>
  <loadinglabel>Loading...</loadinglabel>
  <selectionlabel>Features Selected:</selectionlabel>
  <gridresultslabel>Show Results in Grid</gridresultslabel>
  <csvdefaultname>Selected Records</csvdefaultname>
  <relatescsvdefaultname>Related Records</relatescsvdefaultname>
  <exportbtnlabel>Export...</exportbtnlabel>
  <export2csvoptionlabel>Export to CSV...</export2csvoptionlabel>
  <export2txtoptionlabel>Export to Txt...</export2txtoptionlabel>
  <bufferlabel>apply a search distance:</bufferlabel>
  <spatialsearchlabel>Spatial search</spatialsearchlabel>
  <applybufferlabel>Apply buffer</applybufferlabel>
  <searchlayerlabel>Search entities of:</searchlayerlabel>
  <enablemultipartsearch>enable multi-part graphics</enablemultipartsearch>
  <zoomalllabel>Zoom</zoomalllabel>
  <zoomalltip>Zoom to all results</zoomalltip>
  <bufferalpha>Adjust buffer alpha</bufferalpha>
  <buffercolor>Select buffer color</buffercolor>
</labels>
<symbols>
  <simplefillsymbol color="0xff0000" alpha="0.5">
   <outline color="0xff0000" alpha="0.8" width="2" />
  </simplefillsymbol>
  <!-- You can have one or the other, either simplemarkersymbol or picturemarkersymbol
   defined for your point results NOT BOTH. picturemarkersymbol will override
   simplemarkersymbol if you do not have it commented out. -->
  <!-- <simplemarkersymbol style="square" size="12" color="0xff0000" alpha="0.5"
   xoffset="0" yoffset="0" angle="0"> <outline style="solid" color="0x000000"
   alpha="1" width="1"/> </simplemarkersymbol> -->
  <picturemarkersymbol url="assets/images/i_search.png" height="30" width="30" xoffset="0" yoffset="0" />
  <simplelinesymbol color="0xff0000" alpha="0.8" width="2" />
</symbols>
</configuration>
Tags (2)
0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus
Becky,

   What version of the widget are you using?

This expression value is all messed up:

<value prompt="Example: BERLIN" field="feat_name"</value>


It should look like this:

<value prompt="Example: BERLIN">upper(feat_name) LIKE upper('[value]%')</value>


or something close. You have many examples of the proper syntax in the SearchWidget.xml that came with the download.
0 Kudos
BeckyCarr
New Contributor II
Made that change, now getting the #1085 error.  I'm using 3.0.  I'll keep checking the syntax.  Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Becky,

   I see one other syntax error:

            <relates>
                <relate id="0" label="Projects" enableexport="true" icon="assets/images/i_hydro.png">
                    <fields all="true">
                </relate>
            </relates>


Needs to be:

            <relates>
                <relate id="0" label="Projects" enableexport="true" icon="assets/images/i_hydro.png">
                    <fields all="true"/>
                </relate>
            </relates>
0 Kudos
BeckyCarr
New Contributor II
And...back to getting the #1090 error again.  I'll keep working on it.  Thanks again.
0 Kudos
RhettZufelt
MVP Frequent Contributor
how about this?

<tables><!-- This section is ONLY for tables (i.e. data that has no geometry)! -->
<table>
<definitionexpression></definitionexpression>
<enableexport></enableexport>
<name></name>
<url></url>
<expressions>
<expression></expression>
</expressions>
<titlefield></titlefield>
<fields></fields>
<links>
</links>
<queryattachments></queryattachments>
</table>
</tables>


R_
0 Kudos
BeckyCarr
New Contributor II
R,
Thank you!! That got rid of the errors.  Now, I'm not getting a relate result, but I'm at least getting the Search result.
0 Kudos
BeckyCarr
New Contributor II
I'm using 3.0.4 esearch.  No more errors.  Relate shows in directory.  Search works, but no relate window comes up.
0 Kudos