Another thought, but I'm home now and won't be around FlashBuilder until Monday at earliest (possibly the following Monday) so cant test it out so I thought I'd throw it at ya in case you want to try.You may be able to utilize the eSearchWidget for this. Have not tried it, but you could try to enter the same layer in twice. One with your expression that you want, the other would select everything <> to your expression. You can then configure the popup fields for each config layer separately with their respective fields.Have it preload=open and size it so it's just the "active" button (or whatever you want to see on the GUI).Then disable everything except the graphic search (mappoint) button, and make active by default, and keep active.Disable autozoom if you want it to behave more like a "regular" popup, otherwise, might actually be nice as the normal popup will "obscure" itself on the margins if the feature clicked is near the edge, and autozoom (or set the zoomscale so that it more auotpans) to feature option would be nice on the popup (In case the developers are reading this autopantocenter for popup feature option would be great 🙂.Have not tried it, so don't know if you can do this with the "same" feature layer in the search.xml more than once, but it is pretty robust widget, so is worth a try.Theory is that since the eSearch doesn't actually search the graphics loaded on the map, but rather the feature layer you list in the config, and, each layer has a <definitionexpression/>tag. In "theory", if you click on a feature that doesn't match the definitionexpression, it should match the "other" layers query and pull the popup configed for that layer. If it meets the criteria, the feature will be there and will show the popup fields configured for that layer. This is why the two layers definitions queries would have to be mutually exclusive. (might even be able to do something like defquery1 = sometest, and defquiery2 = NOT(sometest) )If you want to test, this is what I was thinking for the eSearchWidget.xml:<?xml version="1.0" ?>
<!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation -->
<configuration>
<layers>
<layer>
<definitionexpression>(County = 'Brunswick') OR (County = 'Bertie')</definitionexpression>
<enableexport>false</enableexport>
<name>NC Surveyed Only</name>
<url>http://gis.ncdcr.gov/ArcGIS/rest/services/NC_Surveyed_Only/MapServer/0</url>
<expressions/>
<graphicalsearchlabel>Click for Info</graphicalsearchlabel>
<spatialsearchlayer>false</spatialsearchlayer>
<titlefield>Site_ID</titlefield>
<fields all="false">
<field name="Id" alias="Id" numberformat="2|,|." />
<field name="Staus" alias="Staus" gridfield="false" />
<field name="Site_Name" alias="Site_Name" gridfield="false" />
<field name="Quad_Name" alias="Quad_Name" gridfield="false" />
<field name="Notes" alias="Notes" gridfield="false" />
<field name="DESCRIPTIO" alias="DESCRIPTIO" gridfield="false" />
<field name="YearSurvey" alias="YearSurvey" gridfield="false" />
<field name="YearUpdate" alias="YearUpdate" gridfield="false" />
<field name="County" alias="County" gridfield="false" />
<field name="Density" alias="Density" gridfield="false" />
<field name="HDstatus" alias="HDstatus" gridfield="false" />
</fields>
<links/>
<zoomscale usegeometry="true" zoompercent="1"></zoomscale>
<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>
<layer>
<definitionexpression>NOT((County = 'Brunswick') OR (County = 'Bertie'))</definitionexpression>
<enableexport>false</enableexport>
<name>NC Surveyed Only</name>
<url>http://gis.ncdcr.gov/ArcGIS/rest/services/NC_Surveyed_Only/MapServer/0</url>
<expressions/>
<graphicalsearchlabel>Click for Info</graphicalsearchlabel>
<spatialsearchlayer>false</spatialsearchlayer>
<titlefield>Site_ID</titlefield>
<fields all="false">
<field name="Id" alias="Id" numberformat="2|,|." />
<field name="Staus" alias="Staus" gridfield="false" />
<field name="Site_Name" alias="Site_Name" gridfield="false" />
<field name="County" alias="County" gridfield="false" />
</fields>
<links/>
<zoomscale usegeometry="true" zoompercent="1"></zoomscale>
<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>
</layers>
....................................
<spatialrelationships>
<keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>
<autozoomtoresults>true</autozoomtoresults>
<popupsdisabled>false</popupsdisabled>
<enabledatagridinteractionwithwidget>false</enabledatagridinteractionwithwidget>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
<tolerancebydefault>false</tolerancebydefault>
<spatialreference>102100</spatialreference>
<zoomscale>2400</zoomscale>
<geometryservice>http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
<csvseparator>,</csvseparator>
<disablebuttons>text,result,spatial,grid,datagrid</disablebuttons><!--possible values one or more not all four search types comma separated text,graphic,spatial,grid,datagrid -->
<defaultselectionoption>graphicalInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->
<enabledrawgraphicbutton>true</enabledrawgraphicbutton>
<enablebuffergraphicbutton>true</enablebuffergraphicbutton>
<selectedgraphicaltool>mappoint</selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
<multipartgraphicsearch>false</multipartgraphicsearch>
<floatorfixed>float</floatorfixed><!-- possible values are fixed and float -->
<relatetooltip>Show Relates</relatetooltip>
<relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
....................................................
That is kind of what I am thinking, of course, this only the relevant parts, not complete xml.I don't see a photo field, so not sure where you store that info, so I just made it so if it's NOT one of the two counties listed, it should give popup with "fewer" fields, if is in one of the two counties, should give popup will all the fields. (If this works, AND if I didn't make any stupid typos )If you try and it doesn't give errors, but doesn't work right, would look into the definitionexpression coding. Would be my most likely mistake other than typos.Also, I see you are not running a geometry server, I get better "faster" results with queries/searches, etc that utilize it if using my own rather than the default.Just in case you want to try. One nice thing about it is that Robert has written it so that everything I mentioned can be done with the eSearchWidget.xml file and no compiling needed (well, again, "if" it can be done )R_now that I typed that all up, not sure you can get around having to choose one of the search layers from a dropdown first. Don't know if it can be configed to search both layers, even with same name, at once as I suspect it will put them both in a dropdown.