Select to view content in your preferred language

Enhanced Search Widget - Domains

3047
25
09-21-2012 08:40 AM
AndrewMilanes
Frequent Contributor
I can't seem to figure out the correct expression syntax for using a domain.  Here's what I have, which isn't working:

        <layer>
            <definitionexpression/>
            <enableexport>true</enableexport>
            <name>Field Boom</name>
            <url>http://webmaps.es2-inc.com:6080/arcgis/rest/services/dfm_fs/Group_Response_Assets/FeatureServer/5</url>
            <expressions>
                <expression alias="Boom Type" textsearchlabel="Seach for Boom Type:" isvaluerequired="false">
                    <values>
                        <value prompt="Select boom type" usedomain="true" field name="TYPE">TYPE = '[value]'</value>
                    </values>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Boom</graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>TYPE</titlefield>
            <fields all="true"/>
            <links/>
            <zoomscale usegeometry="true" zoompercent="2"/>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates/>
            <symbology>
                <simplefillsymbol color="0x0000ff" alpha="0.5">
                    <outline color="0x00ffff" alpha="0.8" width="2"/>
                </simplefillsymbol>
            </symbology>
        </layer>
Tags (2)
0 Kudos
25 Replies
RhettZufelt
MVP Notable Contributor
Does this widget support the subtypes on a FeatureService?  didn't see anything about it in the documentation, but all the examples are against MapService.

Just a thought,

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   I have never tested it specifically on a FeatureService. Have you tested and it does not work or something?
0 Kudos
RhettZufelt
MVP Notable Contributor
No, have not had time to set up data with sub type, yet alone featureservice. 

I just noticed in David's code that he is searching against FeatureServer/5.

Thought maybe that might be his issue.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

  Ahh... Good catch.

David,

   That might be worth a try. Change FeatureServer to MapServer.

<url>http://webmaps.es2-inc.com:6080/arcgis/rest/services/dfm_fs/Group_Response_Assets/MapServer/5</url>
0 Kudos
DavidAlford1
Occasional Contributor
The offer still stands!! Anyone that wants to help us write or modify widgets for our company and will pays for your time, please send me an email @ dalford@es2-inc.com.
0 Kudos
Scott_Russell
Regular Contributor
Andrew,

   I am not sure where the extra name in this line came from:

<value prompt="Select boom type" usedomain="true" field name="TYPE">TYPE = '[value]'</value>
but it should be:

<value prompt="Select boom type" usedomain="true" field="TYPE">TYPE = '[value]'</value>
as shown in the documentation.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:



Its actually not expressed in the documentation.  You mention it but its not sampled anywhere.
0 Kudos