Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

180770
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
KenCarrier
Deactivated User
Robert,

Sorry to bother you but I am stuck with some of the new syntax.

I have tried finding in your documentation where I am going wrong but I cannot for the life of me find what I am doing wrong.

I am using ArcGIS Viewer for Flex - Application Builder version 3.4 with your widget.

What I am attempting to do is have a dropdown for PROPTYPE which is a subtype(Short Integer), then a drop down underneath that for ACREAGEDOM which is a domain(Short Integer).

I have tried getting it to work with only ACREAGEDOM but I cannot get the values to populate in a drop down. Although i have got it to work with the subtype field PROPTYPE.

Would you mind looking at my xml and telling me if I am doing something wrong. The rest endpoint is here

Code:
    <layers>
        <layer>
            <token/>
            <useproxy>false</useproxy>
            <definitionexpression/>
            <enableexport>true</enableexport>
            <name>Available Land</name>
            <url>http://maps.monroeohio.org/arcgis/rest/services/WMAS/AvailableLand/MapServer/0</url>
            <expressions>
                <expression alias="Agricultural" textsearchlabel="Search by Property Size...">
                    <values>
                        <value prompt="Select size:" field="ACREAGEDOM" usedomain="true">ACREAGEDOM = [value]</value>
                    </values>
                </expression>
                <expression alias="Residential" textsearchlabel="Search by Property Size...">
                    <values>
                        <value prompt="Select size:" field="ACREAGEDOM" usedomain="true">ACREAGEDOM = [value]</value>
                    </values>
                </expression>
            </expressions>
            <titlefield>PARID</titlefield>
            <fields all="false">
                <field name="BCOMPANY" alias="Contact Company" gridfield="true"/>
                <field name="BNAME" alias="Contact Name" gridfield="true"/>
                <field name="BPHONE" alias="Contact Phone" gridfield="true"/>
                <field name="BFAX" alias="Contact Fax" gridfield="true"/>
                <field name="BEMAIL" alias="Contact Email" gridfield="true"/>
                <field name="PROPNAME" alias="Property Name" gridfield="true"/>
                <field name="ZONE" alias="Zone" gridfield="true"/>
                <field name="ACRES" alias="Acres" gridfield="true"/>
                <field name="PARID" alias="ParID" gridfield="true"/>
                <field name="OWNER" alias="Owner" gridfield="true"/>
                <field name="COMMENTS" alias="Comments" gridfield="true"/>
                <field name="PROPTYPE" alias="Property Type" gridfield="true"/>
                <field name="ADDRESS" alias="Address " gridfield="true"/>
                <field name="HYPERLINK" alias="Brochure Link" gridfield="false" hyperlinkgridfield="true" hyperlinkaliastext="Get More Info"/>
                <field name="AUDHYPLNK" alias="Auditor Link" gridfield="false" hyperlinkgridfield="true" hyperlinkaliastext="Get More Info"/>
                <field name="LATITUDE" alias="Latitude" gridfield="true"/>
                <field name="LONGITUDE" alias="Longitude " gridfield="true"/>
            </fields>
        </layer>
    </layers>


Legacy Code from previous version:
<layer>
  <definitionexpression></definitionexpression>
  <enableexport>true</enableexport>
  <name>Available Land</name>
  <url>http://gis.monroeohio.org/MONGIS/rest/services/AvailableLand/MapServer/0</url>
  <expressions>
   <expression alias="Agricultural" textsearchlabel="Search by Property Size..." field="ACREAGEDOM" usedomain="true" fromsubtype="true">PROPTYPE = 0 AND ACREAGEDOM = [value]</expression>
   <expression alias="Residential" textsearchlabel="Search by Property Size..." field="ACREAGEDOM" usedomain="true" fromsubtype="true">PROPTYPE = 1 AND ACREAGEDOM = [value]</expression>
   <expression alias="Commercial" textsearchlabel="Search by Property Size..." field="ACREAGEDOM" usedomain="true" fromsubtype="true">PROPTYPE = 2 AND ACREAGEDOM = [value]</expression>
   <expression alias="Light Industrial" textsearchlabel="Search by Property Size..." field="ACREAGEDOM" usedomain="true" fromsubtype="true">PROPTYPE = 3 AND ACREAGEDOM = [value]</expression>  
   <expression alias="Heavy Industrial" textsearchlabel="Search by Property Size..." field="ACREAGEDOM" usedomain="true" fromsubtype="true">PROPTYPE = 4 AND ACREAGEDOM = [value]</expression>
  </expressions>
  <graphicalsearchlabel>Use one of the graphical search tools to select Available Land</graphicalsearchlabel>
  <spatialsearchlayer>true</spatialsearchlayer>
  <titlefield>PARID</titlefield>
  <fields all="false">
    <field name="BCOMPANY" alias="Contact Company" gridfield="true"/>
    <field name="BNAME" alias="Contact Name" gridfield="true"/>
    <field name="BPHONE" alias="Contact Phone" gridfield="true"/>
    <field name="BFAX" alias="Contact Fax" gridfield="true"/>
    <field name="BEMAIL" alias="Contact Email" gridfield="true"/>
    <field name="PROPNAME" alias="Property Name" gridfield="true"/>
    <field name="ZONE" alias="Zone" gridfield="true"/>
    <field name="ACRES" alias="Acres" gridfield="true"/>
    <field name="PARID" alias="ParID" gridfield="true"/>
    <field name="OWNER" alias="Owner" gridfield="true"/>
    <field name="COMMENTS" alias="Comments" gridfield="true"/>
    <field name="PROPTYPE" alias="Property Type" gridfield="true"/>
    <field name="ADDRESS" alias="Address "gridfield="true"/>
    <field name="HYPERLINK" alias="Brochure Link" gridfield="false" hyperlinkgridfield="true" hyperlinkaliastext="Get More Info"/>
    <field name="AUDHYPLNK" alias="Auditor Link" gridfield="false" hyperlinkgridfield="true" hyperlinkaliastext="Get More Info"/>
    <field name="LATITUDE" alias="Latitude" gridfield="true"/>
    <field name="LONGITUDE" alias="Longitude "gridfield="true"/>
     
  </fields>
  <links>

   <link includeinresults="false" field="AUDHYPLNK" alias="Auditor Link: Get More Info">
    <linkprefix></linkprefix>
    <linksuffix></linksuffix>
    <iconfield></iconfield>
    <iconprefix></iconprefix>
    <iconsuffix></iconsuffix>
   </link>
   
   <link includeinresults="false" field="HYPERLINK" alias="Brochure Link: Get More Info">
    <linkprefix></linkprefix>
    <linksuffix></linksuffix>
    <iconfield></iconfield>
    <iconprefix></iconprefix>
    <iconsuffix></iconsuffix>
   </link>
   
  </links>
  <icon isfield="false"></icon>
  <zoomscale usegeometry="true"/>
  <autoopendatagrid>true</autoopendatagrid>
 </layer>
0 Kudos
JayGeisen
Regular Contributor
Thanks, Robert! So, why does it work when you add this in the compiled code then?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jay,

  I thought you said it was not working period since your upgrade of ArcGIS Server?..
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Justin,

    I email Bjorn to check the status, but I belive that it is going to be a ArcGIS Server issue and not an API issue.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chad,

   When you query numbers you do not use the single qoutes.

<value prompt="Example: 52138" isvaluerequired="true">PROP_ID = [value]</value>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chris,

   There is a bug in the code. As a work around for now just list your relates field and DO NOT use
<fields all="true" />
This will be fixed in the 3.5 release
0 Kudos
ChadHall
Emerging Contributor
Chad,

   When you query numbers you do not use the single qoutes.

<value prompt="Example: 52138" isvaluerequired="true">PROP_ID = [value]</value>


Thanks again, Robert!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ken,

   I have nothing in place for using a domain on a field that is not associated with that field in the REST endpoint. What I mean by that is that if you want a dropdown for ACREAGEDOM to come from the ACREAGEDOM domain then the domain has to be listed as a domain of that field in the REST Service endpoint. For example:

ROW_Type  ( type: esriFieldTypeSmallInteger , alias: ROW Type , Coded Values:  [1: Prescriptive] , [2: Deeded] ) 
0 Kudos
KenCarrier
Deactivated User
Robert,

Thank you that is exactly what I needed which is a second set of eyes.

The domains are associated at the subtypes level not at the field level. In addition, for some reason when I replicated from SDE to a file gdb the domain did not come over, that was the big issue.

I now have the subtypes and field associated with the domain so I think this will work now.

As always thank you for your help and contributions to the community, it is greatly appreciated!
0 Kudos
JayGeisen
Regular Contributor
Robert,

Right. It stopped working when I upgraded to 10.2. The changes you specified to the eSearch.mxml fixed the issue, however. I'm just wondering why it works when you code it into the mxml, but not in the xml?
0 Kudos