Skip to main content
Question

Updating AGOL Feature Layer - No ObjectID?


I am trying to create a workflow that will update a feature layer on ArcGIS Online that is powering a dashboard but keep running into several roadblocks regarding updating the layer. The points themselves are being updated from two sources (other AGOL feature layers) and I am using FME to combine them. First they go through an attribute manager to get the schema matching (They are similar, but different attribute names and one is significantly longer because it just has more data. This longer one is the base for the "master layer"), then those two go through an Update Detector transformer with both of those being compared to the "mater" feature layer. That update detector finds which existing records have been updated (I hope) and then those updated or new records are linked to the master feature layer writer in Update mode. The problem I am running into is when I hit run, an error occurs and says "your layer is missing the ID attribute 'OBJECTID' needed to update/delete". However I can clearly see there is an object ID field in the master feature layer. First off, does this workflow sound right and if so what could be causing this error? I will add a screenshot with this post but I can't provide the FME file unfortunately.

 

In the attribute editors I have the ObjectIDs removed as when the data is sent to AGOL, it will create new objectIDs. The update detector is creating matches using a different unique ID within the join layers that are from user input.

6 replies

rahulsharma
Safer
Forum|alt.badge.img+10

Hi @afackler_napsg, updating ArcGIS Online can be a bit tricky when updating. If you read the article and follow the steps as mentioned here https://knowledge.safe.com/articles/19302/how-do-i-write-updates-to-an-existing-arcgis-onlin.html

 

ChangeDetector or Updatedetector(old version) usually are good tools to identify the changes/deltas in the data, but require additional steps to prepare the data to be published to AGOL.

 

I would recommend using FeatureMerger instead and fme_db_operation to perform UPDATES

runneals
Contributor
Forum|alt.badge.img+19
  • Contributor
  • May 15, 2020
Going off of what Rahul mentioned, if you want to update or delete, you'll need to have something (whether that be a CSV, FFS or other file) that you can use with the feature merger that contains the OBJECTID. But you'll need to keep the file updated or you could read in from the REST service (depending on what you want your performance to be and how often this will be ran). We have several jobs at my organization that we update data on arcgis online and we use either a CSV or FFS merged with the incoming data so we can get the OBJECTID. Let me know if you have questions and I can share a working sample

runneals wrote:
Going off of what Rahul mentioned, if you want to update or delete, you'll need to have something (whether that be a CSV, FFS or other file) that you can use with the feature merger that contains the OBJECTID. But you'll need to keep the file updated or you could read in from the REST service (depending on what you want your performance to be and how often this will be ran). We have several jobs at my organization that we update data on arcgis online and we use either a CSV or FFS merged with the incoming data so we can get the OBJECTID. Let me know if you have questions and I can share a working sample

Would reading in from the feature layer work? Like how I have it in my example above but instead of Update Detector I use Feature Merger?


deanhowell
Influencer
Forum|alt.badge.img+23
  • Influencer
  • April 25, 2025

I am trying to do a similar thing but writing to ArcGIS Enterprise Portal.  I also just want to replace the dataset completely if it exists rather than just update changes but I am getting an error where it thinks the objectid is missing.  

Does anyone have advice on how to replace an existing Portal layer with a new one?


deanhowell
Influencer
Forum|alt.badge.img+23
  • Influencer
  • April 25, 2025
runneals wrote:

Going off of what Rahul mentioned, if you want to update or delete, you'll need to have something (whether that be a CSV, FFS or other file) that you can use with the feature merger that contains the OBJECTID. But you'll need to keep the file updated or you could read in from the REST service (depending on what you want your performance to be and how often this will be ran). We have several jobs at my organization that we update data on arcgis online and we use either a CSV or FFS merged with the incoming data so we can get the OBJECTID. Let me know if you have questions and I can share a working sample

@runneals I know it has been a while but are you still willing to share a working sample workbench?


birgit
Influencer
Forum|alt.badge.img+16
  • Influencer
  • April 25, 2025

I think replacing a portal layer can be either easy or kinda difficult depending on the type of layer you have. A Scene layer for example has a special rest command which can be used to replace the original layer with another one. By using this you don't have to use the objectid field. However you do need to use the httpcaller to construct the replaceService call.

 

If you have a Feature Layer or a MapImageLayer the question has to be if it is a Hosted layer or not. If it is not hosted then you might be able to target the feature class in either an SDE or a FGDB directly and if you do it like that you can just tuncate the Feature Class which is so much faster,

In terms of the error you are seeing I am wondering which writer you are using. If I take a look at the Esri ArcGIS Portal Feature Service I can just use the mode INSERT and set Truncate First to Yes

Settings in my FeatureWriter transformer

But beware this can be very slow. If your layer is referenced(i.e. not hosted) it's way faster to do these operations directly on the dataset.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings