I am working with grouped layers for the first time in FlexViewer 3.6. I have an .mxd with several (about 50) layers set into 7 groups. While I can get everything to display nicely in the TOC, I cannot get the search tool to function correctly. I think it has to do with the use of sub-layers, as dynamic layers are new to me and I'm fumbling my way through (ESRI does not provide much of info on their use, or maybe I'm just a goober).
When I fire up the Search widget, I get an E0011E: Invalid feature layer error. My main config file looks like this:
<operationallayers>
<layer type="dynamic" visible="true" label="SWITRS Incidents" url="http://d16-da/arcgis/rest/services/SWITRS_New_10/MapServer/"/>
<sublayer id="0"/>
</operationallayers>
I find it strange that by setting a single sublayer, I can see all the layers/groups in my .mxd. I thought I would have to set a sublayer for each...
The .xml for the search widget is:
<layers>
<layer>
<name>Valley Division</name>
<url>http://d16-da/arcgis/rest/services/SWITRS_New_10/MapServer/</url>
<expression>COLLISION_ LIKE '%[value]%'</expression>
<textsearchlabel>Search by Incident Date [ Example: 6/7/2006 or %2009]</textsearchlabel>
<titlefield>SWITRS Incidents</titlefield>
<fields all="false">
<field name="PRIMARY_RD"/>
<field name="SECONDARY_"/>
<field name="COLLISION_" alias="Incident Date"/>
<format dateformat="shortDate"/>
</fields>
<symbol>
<simplemarkersymbol color="0xFF0000" size="5" style="circle" />
</symbol>
</layer>
</layers>
So anyone see anything wrong right off the bat? Am I using dynamic layers or grouped layers incorrectly? Do dynamic layers even work with the search tool? Any advice on using dynamic and grouped layers is greatly appreciated.
Thanks!
Matthew Weber