Select to view content in your preferred language

How to exclude layers from flex viewer attribute table widget

3073
3
11-30-2014 11:12 PM
NadirHussain
Frequent Contributor

Dear All,

<configuration>

   <layer label="Points" url="http://dell-pc/ArcGIS/rest/services/Sirens/FeatureServer/2"></layer> <!-- non-mapped layer(s), added for just this widget -->

   <layer label="Buffer" url="http://dell-pc/ArcGIS/rest/services/Sirens/FeatureServer/3"></layer> <!-- non-mapped layer(s), added for just this widget -->

   <layersettings>

      <layer name="Points"> <!-- Overwriting layer settings for a feature layer -->

         <fields>

            <field name="SIREN_NO" alias="Object ID"/>

            <field name="Reg_A" alias="Facility"/>

            <field name="Reg_E" alias="Description"/>

            <field name="Prov_A" alias="Quality"/>

           

            <field name="Prov_E" alias="Object ID"/>

            <field name="City_A" alias="Facility"/>

            <field name="City_E" alias="Description"/>

            <field name="Grade" alias="Quality"/>

           

        <field name="Feature_Type" alias="Object ID"/>

            <field name="Description" alias="Facility"/>

            <field name="Location" alias="Description"/>

            <field name="POINT_X" alias="Quality"/>

           

            <field name="POINT_Y" alias="Description"/>

            <field name="Zone_No" alias="Quality"/>

         </fields>

         <showobjectid>false</showobjectid>

         <showglobalid>false</showglobalid>

         <exportlocation>false</exportlocation>         

         <showattachments>false</showattachments>

         <showrelatedrecords>false</showrelatedrecords>

         <!-- <columnsorder>fields|alphabetical|fieldinspector</columnsorder>   -->        

         <columnsorder>fields</columnsorder>        

     </layer>

     <layer name="Buffer"> <!-- Overwriting layer settings for a map service layer -->

         <fields>

            <field name="SIREN_NO" alias="Object ID"/>

            <field name="Reg_A" alias="Facility"/>

            <field name="Reg_E" alias="Description"/>

            <field name="Prov_A" alias="Quality"/>

           

            <field name="Prov_E" alias="Object ID"/>

            <field name="City_A" alias="Facility"/>

            <field name="City_E" alias="Description"/>

            <field name="Grade" alias="Quality"/>

           

        <field name="Feature_Type" alias="Object ID"/>

            <field name="Description" alias="Facility"/>

            <field name="Location" alias="Description"/>

            <field name="POINT_X" alias="Quality"/>

           

            <field name="POINT_Y" alias="Description"/>

            <field name="Zone_No" alias="Quality"/>

         </fields>

         <showobjectid>false</showobjectid>

         <showglobalid>false</showglobalid>

         <exportlocation>false</exportlocation>         

         <showattachments>false</showattachments>

         <showrelatedrecords>false</showrelatedrecords>

         <!-- <columnsorder>fields|alphabetical|fieldinspector</columnsorder>   -->        

         <columnsorder>fields</columnsorder>        

     </layer>

  </layersettings>

  <excludelayer>CapitalCities</excludelayer> <!-- excludes the feature layer and the complete map service layer -->

  <excludelayer>Cities</excludelayer> <!-- excludes the feature layer and the complete map service layer -->

  <excludelayer>KSA</excludelayer> <!-- excluding a sublayer withing a map service layer -->

  <excludelayer>World_Map</excludelayer> <!-- excluding a sublayer withing a map service layer -->

</configuration>

the above is my configuration file for attribute widget.i want to show only points and buffer layers.But in attribute table all layers are coming.please anyone tell me where is the mistake.

Thanks in advance

0 Kudos
3 Replies
AnthonyGiles
Honored Contributor

Nadir,

I cannot see anything that jumps out as being wrong with your config file. One thing to check is that the layer name matches exactly the name of the layer in the main configuration file.

Then make sure that your browser is not caching the config file. Best way is to clear your browser history then close and reopen your browser.

regards

Anthony

0 Kudos
NadirHussain
Frequent Contributor

Dear anthony,

according to the you n0 error.But see the out put.2.pngIn I2.png4.png

0 Kudos
NadirHussain
Frequent Contributor

4.png3.png2.png1.png

0 Kudos