Select to view content in your preferred language

Export attributes to CSV to NOT include Lat Long fields?

2539
5
Jump to solution
10-02-2013 07:32 AM
VenusScott
Frequent Contributor
I am using the basic select tool to populate the Attribute Table with the desired fields I want for a mailing list. When I export the data, a latitude and longitude field are also included. I don't want them. Where can I configure the exclusion of them?

[ATTACH=CONFIG]27959[/ATTACH]
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
VenusScott
Frequent Contributor
Well it turns out the Layer name is not the problem either.

The issue is that I am excluding all layers as defined in the "Layout" tab in the "Attribute Table" widget:

[ATTACH=CONFIG]28018[/ATTACH]

and only using the temporary table data from the "Search" widget!

In the "Search" widget I selected the option to "Add result as operational layer" and this is why the <exportlocation>false</exportlocation> tag in the AttributeTableWidget.xml file does not work. My only solution is to remove the fields in the .csv file.

I've asked that this be an enhancement to ArcGIS Viewer for Flex. #NIM095483

View solution in original post

0 Kudos
5 Replies
AnthonyGiles
Honored Contributor
Venus,

The exportlocation tag needs setting to false in the layer settings of your attribute table config file, see:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Attribute_Table_widget_tags/01m...

E.g:

<layer name="PoolPermits">
             <fields>
                 <field name="objectid" alias="ObjectID"/>
                 <field name="apn" alias="APN"/>s
                 <field name="pool_permit" alias="Pool_Permit"/>                    
             </fields>
             <showobjectid>false</showobjectid>
             <showglobalid>false</showglobalid>
             <exportlocation>false</exportlocation>          
             <showattachments>true</showattachments>
             <showrelatedrecords>true</showrelatedrecords>
             <columnsorder>alphabetical</columnsorder>
</layer>


Regards

Anthony
0 Kudos
VenusScott
Frequent Contributor
This is good information. However it is still not working. In my viewer, the only data I want to see is from the basic "search/selection" tool.
[ATTACH=CONFIG]27978[/ATTACH]

Here is my modified AttributeTableWidget.xml file:
<?xml version="1.0" ?>
<configuration>
    <excludelayer>Council Districts and Members</excludelayer>
    <excludelayer>County Parcels</excludelayer>
    <excludelayer>Address Points</excludelayer>
    <excludelayer>SON Business</excludelayer>
    <excludelayer>SON/1</excludelayer>
    <excludelayer>SON/2</excludelayer>
    <excludelayer>SON/3</excludelayer>
    <excludelayer>SON/4</excludelayer>
    <excludelayer>SON/5</excludelayer>
    <excludelayer>SON/6</excludelayer>
    <excludelayer>SON/10</excludelayer>
    <excludelayer>SON/9</excludelayer>
    <excludelayer>SON/8</excludelayer>
    <excludelayer>SON/7</excludelayer>
    <excludelayer>Neighborhood Associations</excludelayer>
    <excludelayer>Council Districts and Members/0</excludelayer>
    <excludelayer>Council Districts and Members/1</excludelayer>

    <layersettings>
<layer>
     <sublayer>
         <exportlocation>false</exportlocation>
     </sublayer>
</layer>
    </layersettings>
</configuration>

I'm still getting the exported lat/long values?

[ATTACH=CONFIG]27979[/ATTACH]

I'm thinking it's because of using the "selected" data as opposed to an actual "layers's" fields?

Open to any thoughts or suggestions!

Thanks!
0 Kudos
AnthonyGiles
Honored Contributor
Venus,

You need to provide a layer name in your layer tag and you only need to use the sublayer tag if your layers are coming from a single mapservice and you are not adding your layers in as individual feature services:

<layersettings>
<layer name="layer name">
<exportlocation>false</exportlocation>
</layer>
</layersettings>

Regards

Anthony
0 Kudos
VenusScott
Frequent Contributor
Hmm? Same result even it I put a layer name in it?

<?xml version="1.0" ?>
<configuration>
    <excludelayer>Council Districts and Members</excludelayer>
    <excludelayer>County Parcels</excludelayer>
    <excludelayer>Address Points</excludelayer>
    <excludelayer>SON Business</excludelayer>
    <excludelayer>SON/1</excludelayer>
    <excludelayer>SON/2</excludelayer>
    <excludelayer>SON/3</excludelayer>
    <excludelayer>SON/4</excludelayer>
    <excludelayer>SON/5</excludelayer>
    <excludelayer>SON/6</excludelayer>
    <excludelayer>SON/10</excludelayer>
    <excludelayer>SON/9</excludelayer>
    <excludelayer>SON/8</excludelayer>
    <excludelayer>SON/7</excludelayer>
    <excludelayer>Neighborhood Associations</excludelayer>
    <excludelayer>Council Districts and Members/0</excludelayer>
    <excludelayer>Council Districts and Members/1</excludelayer>

    <layersettings>
<layer name="Address Locations - 5 miles">
     <exportlocation>false</exportlocation>
</layer>
    </layersettings>
</configuration>

Could the layer name be the issue since it has a hyphen in it?
0 Kudos
VenusScott
Frequent Contributor
Well it turns out the Layer name is not the problem either.

The issue is that I am excluding all layers as defined in the "Layout" tab in the "Attribute Table" widget:

[ATTACH=CONFIG]28018[/ATTACH]

and only using the temporary table data from the "Search" widget!

In the "Search" widget I selected the option to "Add result as operational layer" and this is why the <exportlocation>false</exportlocation> tag in the AttributeTableWidget.xml file does not work. My only solution is to remove the fields in the .csv file.

I've asked that this be an enhancement to ArcGIS Viewer for Flex. #NIM095483
0 Kudos