Select to view content in your preferred language

Limit Attribute Table widget by Search Widget results

2262
2
Jump to solution
01-31-2013 02:31 AM
BrentSlone1
Emerging Contributor
Hello All!

Is there a way to limit the features in the 'Attribute Table' widget buy features that are selected through another widget?  So say for example I have a Search widget that you can select fire departments in a given area.  I also have the fire station layer turned on in attribute table.  The out of the box configuration shows all features that are visible in the current extent.  I want to limit features shown in attribute table widget by what's selected through the Search Widget. 

So if there are 10 fire stations in the current extent and I use the Search widget to select 3 of them, I would like for the attribute table to only show those three. 

Thanks for your help! 

Server 10.1, FV 3.1, Flash Builder 4.7

Brent
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
HeatherGonzago
Esri Contributor
Not sure how you are working with the Viewer? Tag references or Application Builder? Either way you should be able to do this.

If working in Application Builder, all you would need to do is check on the dialog box "Add result as operational layer" in the Search widget settings. This does the equivalent of the <shareresults> tag in the Search Widget config tags, http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Search_widget_tags/01m300000023....

View solution in original post

0 Kudos
2 Replies
HeatherGonzago
Esri Contributor
Not sure how you are working with the Viewer? Tag references or Application Builder? Either way you should be able to do this.

If working in Application Builder, all you would need to do is check on the dialog box "Add result as operational layer" in the Search widget settings. This does the equivalent of the <shareresults> tag in the Search Widget config tags, http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Search_widget_tags/01m300000023....
0 Kudos
BrentSlone1
Emerging Contributor
Hello Heather!

Thank you for the response.  I was able to successfully use the <shareresults>true</shareresults> tag for both the search widget and the query widget.  It generates an operational layer in the attribute table tray will results found.  Thank you! Now, I have two more questions.  First, is there a way to specify what attributes the "operational layer" returns in the attribute table tray?  Currently on the widgets I configured it is only returning first attribute.  Below is the xml code.  It only returns the "Project_NA" attribute.  I changed the <fields all="false"> to true but it appears that it is only related to results found in the widget. 

<?xml version="1.0" ?>
<configuration>
    <layer>http://kab1-as2:6080/arcgis/rest/services/AMEC/AMEC/MapServer/1</layer>
    <query>STATUS = 'Planned'</query>
    <titlefield>PROJECT_NA</titlefield>
    <linkfield/>
    <refreshrate/>
    <zoomscale/>
    <shareresults>true</shareresults>
    <orderbyfields>PROJECT_NA</orderbyfields>
    <fields all="false">
        <field name="PROJECT_NA" alias="Project Name"/>
        <field name="STATUS" alias="STATUS"/>
        <field name="Perc_Complete" alias="Status % Complete"/>
    </fields>
</configuration>


The second question is related to the Chart widget.  Is there a similar tag that will generate an operational layer for chart results?  So if my widget allows the user to graphically select point locations to populate a few bar charts; is there a way to generate an operational layer at that point?  I hope that makes sense.  Below is my xml code for said chart:

<?xml version="1.0" ?>
<configuration>
    <highlightcolor>3368601</highlightcolor>
    <labels>
        <layerselectionlabel>Select layer</layerselectionlabel>
        <drawtoolmenulabel>Select draw tool</drawtoolmenulabel>
    </labels>
    <layers>
        <layer label="Capacity Analysis" url="http://kab1-as2:6080/arcgis/rest/services/NTMA/NTMA/MapServer/1">
            <labelfield>PROJECT_NA</labelfield>
            <fields>
                <field name="PROJECT_NA"/>
                <field name="Personnel_Cap"/>
                <field name="Dining_Cap"/>
                <field name="Latrine_Cap"/>
                <field name="Office_Cap"/>
            </fields>
            <medias>
                <media chartfields="Personnel_Cap" title="Barracks Capactiy" type="columnchart"/>
                <media chartfields="Dining_Cap" title="Dining Capacity" type="columnchart"/>
                <media chartfields="Latrine_Cap" title="Latrine Capacity" type="columnchart"/>
                <media chartfields="Office_Cap" title="Admin/Office Capacity" type="columnchart"/>
            </medias>
        </layer>
    </layers>
</configuration>


Thanks so much for your time and response. 

Cheers,

Brent
0 Kudos