Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

178699
776
04-30-2013 03:58 PM
RobertScheitlin__GISP
MVP Emeritus
All,

   Here is a new thread to post questions and discuss the Enhanched Search Widget. The old thread was getting too long.
Tags (2)
776 Replies
RobertScheitlin__GISP
MVP Emeritus
Tom,

   The documentation has both an example and text eplaining how to use a domain.

Page 7 of the pdf has the example, page 3 the explanation:

<expressions>
    <expression alias="Agree with incident" textsearchlabel="Search Incidents that are agreed to:">
        <values>
            <value prompt="Example: True" field="agree_with_incident" usedomain="true">agree_with_incident = [value]</value>
        </values>
    </expression>
    <expression alias="Incident date" textsearchlabel="Search Incidents on or after date:">
        <values>
            <value prompt="Example: 2012/04/16">datetime >= '[value] 00:00:00'</value>
        </values>
    </expression>
</expressions>
0 Kudos
ThomasBrophy
Regular Contributor
All,
I have 2 networks with the same setup. On one side, "domain", "userlist" & "uniquevalsfromfield" work fine.

usedomain - allows
user types the value
userlist - creates dropdown from list
uniquevalsfromfield - populates dropdown from field

But I can not get the "uniquevalsfromfield" to create a dropdown list on the other network. Does anyone have any idea why this is happening?

//
Here is my configuration on both sides:
. mid-Tier, 1 VCS Server
. Windows Server 2008 R2 Enterprise SP1, 64-bit, 2 Processors, 8GB RAM
. IIS 7.5 (SSL)
. IE 8 is used by default
. ArcGIS Viewer 3.3 for Flex (Source code) [arcgis-viewer-flex-3.3-src.zip]
. ArcGIS API 3.3 for Flex [arcgis_api_for_flex_3_3.zip]
. Flash Builder 4.6 [FlashBuilder_4_6_LS10.exe]
. Flex SDK 4.6 [flex_sdk_4.6.zip]

Here is my eSearchWidget.xml

<?xml version="1.0" ?>
<configuration>
 <layers>
  <layer>
   <token/>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <enableprintgrid title="Selected Offices">true</enableprintgrid>
   <name>Office Locations</name>
   <url>https://{myURL}/ArcGIS/rest/services/xyz/MapServer/0</url>
   <expressions>
    <expression alias="AOR from Drop-down" textsearchlabel="Choose from Drop-down" isvaluerequired="true">
     <values>
      <value prompt="Drop-down" uniquevalsfromfield="AOR" isvaluerequired="true" autosubmit="false">AOR = '[value]'</value>
     </values>
    </expression>
    <expression alias="AOR from userlist" textsearchlabel="Choose from Drop-down" isvaluerequired="true">
     <values>
      <value prompt="From userlist" userlist="SOUTHCOM,NORTHCOM,PACOM" autosubmit="false">AOR = '[value]'</value>
     </values>
    </expression>   
    <expression alias="Type in AOR" textsearchlabel="Type any part of name" isvaluerequired="true">
     <values>
      <value prompt="Example: NORTHCOM " field="AOR" usedomain="true">AOR LIKE '%[value]%'</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select office locations</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>NAME</titlefield>
   <fields all="false">
          <field name="NAME" alias="Name" gridfield="true" />
          <field name="CITY" alias="Office Location" gridfield="true" />
          <field name="AOR" alias="DoD AOR" gridfield="true" />
   </fields>
   <links/>
   <zoomscale usegeometry="true" zoompercent="1.0"/>
            <autoopendatagrid>true</autoopendatagrid>
   <queryattachments>false</queryattachments>
  </layer>
 </layers>
 <tables/>
 <spatialrelationships>
  <spatialrelationship>
   <name>esriSpatialRelContains</name>
   <label>entirely contained in</label>
  </spatialrelationship>
  <spatialrelationship>
   <name>esriSpatialRelIntersects</name>
   <label>intersected by</label>
  </spatialrelationship>
  <spatialrelationship>
   <name>esriSpatialRelEnvelopeIntersects</name>
   <label>intersected by envelope of</label>
  </spatialrelationship>
 </spatialrelationships>
 <bufferunits>
  <bufferunit>
   <name>UNIT_FOOT</name>
   <label>Feet</label>
  </bufferunit>
  <bufferunit selected="true">
   <name>UNIT_STATUTE_MILE</name>
   <label>Miles</label>
  </bufferunit>
  <bufferunit>
   <name>UNIT_METER</name>
   <label>Meters</label>
  </bufferunit>
  <bufferunit>
   <name>UNIT_KILOMETER</name>
   <label>Kilometers</label>
  </bufferunit>
 </bufferunits>
 <buffervalue>25</buffervalue>
 <printdatagrid>
  <addheadertoeachpage>true</addheadertoeachpage>
  <columnheaderbgcolor>0xa7a7a7</columnheaderbgcolor>
  <columnheaderfontcolor>0x000000</columnheaderfontcolor>
  <footer>
   <pageoftext>Page ## of ##</pageoftext>
   <includeprintdate format="MM-DD-YYYY L:NN A">true</includeprintdate>
   <disclaimer></disclaimer><!-- be carefull of the length -->
  </footer>
 </printdatagrid>
        <removeserchlayersminmaxscale>true</removeserchlayersminmaxscale>
 <keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>
 <autozoomtoresults>true</autozoomtoresults>
 <popupsdisabled>true</popupsdisabled>
 <enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
 <toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
 <tolerancebydefault>true</tolerancebydefault>
 <spatialreference>102003</spatialreference>
 <zoomscale>577791</zoomscale>
 <csvseparator>,</csvseparator>
        <textqualifier>"</textqualifier> 
 <disablebuttons></disablebuttons><!--possible values one or more not all four search types comma separated text,graphic,spatial,result,datagrid -->
 <defaultselectionoption>textInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->
 <enabledrawgraphicbutton>true</enabledrawgraphicbutton>
 <enablebuffergraphicbutton>true</enablebuffergraphicbutton>
        <enablelocategraphicbutton>false</enablelocategraphicbutton>
        <enablemultigraphicssearch>true</enablemultigraphicssearch>
        <enableincludetextsearch>true</enableincludetextsearch>
        <enableaddtollerance>true</enableaddtollerance>
        <enablegraphicsbuffering>true</enablegraphicsbuffering>
 <selectedgraphicaltool>extent</selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
 <multipartgraphicsearch>false</multipartgraphicsearch>
 <floatorfixed>fixed</floatorfixed><!-- possible values are fixed and float -->
 <relatetooltip>Show Relates</relatetooltip>
 <relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
 <labels>
  <urlsearcherrormessage>URL search parameters are incorrect</urlsearcherrormessage>
  <include>include text query in selection criteria</include>
  <includewarn>Must be the same search layer in both
graphical and text search pages.</includewarn>
  <buffergrapicprops>Buffer graphic properties</buffergrapicprops>
  <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 Enhanced Draw Widget Graphics</existingdrawgraphicslabel>
        <existinglocategraphicslabel>Use Existing Enhanced Locate Widget Graphics</existinglocategraphicslabel>
  <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>Fill opacity</bufferalpha>
  <buffercolor>Fill color</buffercolor>
  <nobuffercolor>No fill color</nobuffercolor>
  <bufferoutlinecolor>Outline color</bufferoutlinecolor>
  <nobufferoutlinecolor>No outline color</nobufferoutlinecolor>
  <bufferoutlinewidth>Outline Width</bufferoutlinewidth>
  <configbuffergra>Configure buffer graphic properties...</configbuffergra>
  <required>*</required>
  <requiredtooltip>This field is required.
Enter a value to enable search button</requiredtooltip>
  <selectmethodtip>Click to change the selection method</selectmethodtip>
  <newselectionmethodtip>Create new selection</newselectionmethodtip>
  <addselectionmethodtip>Add to current selection</addselectionmethodtip>
  <removeselectionmethodtip>Remove from current selection</removeselectionmethodtip>
 </labels>
 <symbols>
  <simplefillsymbol color="0x448ccb"
        alpha="0.4"
        style="solid">
   <outline color="0x990000"
      alpha="0.8"
      width="2"/>
  </simplefillsymbol>
  <simplemarkersymbol style="circle"
       size="12"
       color="0x448ccb"
       alpha="0.8"
       xoffset="0"
       yoffset="0"
       angle="0">
   <outline style="solid"
      color="0x990000"
      alpha="0.8"
      width="1"/>
  </simplemarkersymbol>
  <simplelinesymbol color="0x448ccb"
        alpha="0.8"
        width="2"/>
 </symbols>
</configuration>


//
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Thomas,

   What I don't see listed in your specs is the ArcGIS Server Version and Service Pack. The uniquevalsfromfield requires an ArcGIS Server 10 or greater. You can use Fiddler or some other http traffic inspector/analyzer to see if you are getting any 400 errors from that server.
0 Kudos
ThomasBrophy
Regular Contributor
Thomas,

What I don't see listed in your specs is the ArcGIS Server Version and Service Pack. The uniquevalsfromfield requires an ArcGIS Server 10 or greater. You can use Fiddler or some other http traffic inspector/analyzer to see if you are getting any 400 errors from that server.


Robert,
Thank you for responding so quickly. I really appreciate it.

Yes, I am running ArcGIS 10 Server Advanced Enterprise SP5 (10.05) but I cannot set up an �??http traffic inspector/analyzer�?� because it's on a SECRET network. Any ideas what would cause the different results of the same code?

I looked at the IIS logs at the time I opened and clicked the pulldown that did not work, (This may help???)
This is a hand jam, so let me know if you need more.
�?�GET/ArcGIS/rest/services/hsip/mapserver/5/query returnGeometry=false&test=%&f=json&returnIdsOnly=true &spatialRel=esriSpatialRelIntersects 443 �?? 22.50.xx.xxx Mozilla/4.0+(compatable;+MSIE+7  .   .   .   .   .   .   .   /bin-debug/index.swf  200  0  0  479


Thanks again Robert.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Thomas,

   Can you do queries from the rest end point of that server without issue?
0 Kudos
ThomasBrophy
Regular Contributor
Thomas,

   Can you do queries from the rest end point of that server without issue?


Yes, I can query using the Flex application (ArcGIS Viewer for Flex v3.3) and from the REST Endpoint "Query" with no problem.  Actually, everything is working well with eSearch except this pulldown.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Thomas,

   I am sorry to say nothing is jumping out at me on this one. I am not sure where to dirrect you from here without some error message from the http requests or something. If you can add Google Chrome them you can use Developer Tools to inspect the http traffic, and if you are on IE9 then you can use F12 to get to IE developer tools.
0 Kudos
ThomasBrophy
Regular Contributor
Robert,

As long as nothing jumps out at you in the code I sent, I guess thats the best we can do.  Thank you for your time.  I appreciate it.

Have great day!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Thomas,

   I would recommend trying version 3.3.3 as I found that ArcGIS Server can return a query error "Unable to complete query" quite often when the server is hit with multiple requests in rapid succession. I have put four more attempts in the uniquevalsfromfield requests before it fails.
0 Kudos
ThomasBrophy
Regular Contributor
Thomas,

   I would recommend trying version 3.3.3 as I found that ArcGIS Server can return a query error "Unable to complete query" quite often when the server is hit with multiple requests in rapid succession. I have put four more attempts in the uniquevalsfromfield requests before it fails.


I will try it.  Thank you so much.  I'll let you know if it solves my issues.
0 Kudos