Select to view content in your preferred language

Adding Fields to an AGO Hosted Feature Service in Desktop

5953
5
03-27-2013 06:02 AM
StaceMaples
Frequent Contributor
I'm trying to add fields to a hosted feature service from AGO.  I'm opening the feature service in Desktop (10.1), creating a local copy for editing, then running the Add Field tool in batch mode to add several fields.  When finished, I try to sync the changes to AGO and Desktop crashes.   Any thoughts?
Tags (2)
0 Kudos
5 Replies
StaceMaples
Frequent Contributor
So it looks like after I run the Add Field tool on the layer, the GLOBALID gets hosed.  I don't seem to be able to add a field from the table options, so I am guessing I probably should not be able to use the Add Field Toolbox Tool on the layer, either, but the fact that I do breaks the layer. 

Is there any way to add fields to the FS, outside of downloading the shapefile, updating it and reuploading it?
0 Kudos
by Anonymous User
Not applicable
Hi Stacey,

Unfortunately No, there is not a way to change the schema of a hosted service once it has been published. Looks like you already have the best workaround posted for this, and I would encourage you to log this on the ArcGIS Idea's site to be considered in a future release.

Cheers,
Andrew
0 Kudos
StephanLe_Roux
Emerging Contributor

Stace,

Using Desktop 10.2.2.

Any work around for this problem ? I am having problems with this. I have a AGOL feature service with attachments. Do not want to loose the link between the data and attachments. I am able to update values in a field and sync back to AGOL from desktop with no problem. Adding a field does not give me an error when I sync, it's just not visible in the AGOL feature service. So nothing happens. No new field added to the service.

How can I add fields, sync back to AGOL without publishing again ? If It wasn't for the attachments I would not have had a problem to replace, but this removes all the attachments.

Anybody with ideas or tips ?

Regards

0 Kudos
MelanieRosenberg2
Frequent Contributor

Hi, did you ever find a solution? I guess you could edit the JSON

http://blogs.esri.com/esri/arcgis/files/2014/10/How-to-Update-Hosted-Feature-Service-Schemas1.pdf

I was able to change CVDs, but not add a field... Anyone have a work around?

0 Kudos
sujeetyadav
Deactivated User

For adding a new field to the existing service in AGOL map Go through following Steps

1. First Stop the Map Service from ArcGIS Server if the service is running.

2. Open the attribute table and add as much number of fields as you want.

3. Save the map document

4. Right click the map document in ArcCatalog Press Share as Service

5. Select Overwrite an existing service and publish the map document

6. Open AGOL web map and refresh the link or again add the rest url link

The data will be updated

0 Kudos