I have created some point QueryLayers in ArcMap 1081. The layers are coming from a SQL Server 17 SDE Database. I am trying to figure out whether I can publish this data to our GIS Server as a feature service. Users will need to edit existing point locations and create new ones.
When I go to publish, I get an error about no ObjectID:
I can right click the error and select Add Incrementing IDs option which opens the Add Incrementing ID tool. When I run this, I get an error:
If I remove the Create option in the feature service , I can successfully publish. Any ideas how to add an ObjectID field to the query layers?
Solved! Go to Solution.
You can't add an OBJECTID field to a query layer, you have to select one of the participating tables' OBJECTIDs.
SELECT t1.OBJECTID, t1.field1, t2.field1 FROM ... AS t1 JOIN ... AS t2 ON ...
You should be able to share that as a feature layer. However, I'm pretty sure you won't be able to publish it in a way that users can create new features. For that, you have to publish the original feature classes with write privileges (you can still hide fields).
You can't add an OBJECTID field to a query layer, you have to select one of the participating tables' OBJECTIDs.
SELECT t1.OBJECTID, t1.field1, t2.field1 FROM ... AS t1 JOIN ... AS t2 ON ...
You should be able to share that as a feature layer. However, I'm pretty sure you won't be able to publish it in a way that users can create new features. For that, you have to publish the original feature classes with write privileges (you can still hide fields).
Thanks. I did some testing and found this to be true.