<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Add ObjectID to Query Layer in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/add-objectid-to-query-layer/m-p/1006944#M1663</link>
    <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I go to publish, I get an error about no ObjectID:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TigerWoulds_2-1607090717545.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1496i8252BFC65A4FAC4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TigerWoulds_2-1607090717545.png" alt="TigerWoulds_2-1607090717545.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;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:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TigerWoulds_0-1607090681383.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1494iD8F28A439D643C6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TigerWoulds_0-1607090681383.png" alt="TigerWoulds_0-1607090681383.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TigerWoulds_1-1607090693935.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1495iA80BCDA3A365970E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TigerWoulds_1-1607090693935.png" alt="TigerWoulds_1-1607090693935.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;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?&lt;/P&gt;</description>
    <pubDate>Fri, 04 Dec 2020 14:06:29 GMT</pubDate>
    <dc:creator>tigerwoulds</dc:creator>
    <dc:date>2020-12-04T14:06:29Z</dc:date>
    <item>
      <title>Add ObjectID to Query Layer</title>
      <link>https://community.esri.com/t5/arcmap-questions/add-objectid-to-query-layer/m-p/1006944#M1663</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I go to publish, I get an error about no ObjectID:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TigerWoulds_2-1607090717545.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1496i8252BFC65A4FAC4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TigerWoulds_2-1607090717545.png" alt="TigerWoulds_2-1607090717545.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;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:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TigerWoulds_0-1607090681383.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1494iD8F28A439D643C6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TigerWoulds_0-1607090681383.png" alt="TigerWoulds_0-1607090681383.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TigerWoulds_1-1607090693935.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1495iA80BCDA3A365970E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TigerWoulds_1-1607090693935.png" alt="TigerWoulds_1-1607090693935.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;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?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 14:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/add-objectid-to-query-layer/m-p/1006944#M1663</guid>
      <dc:creator>tigerwoulds</dc:creator>
      <dc:date>2020-12-04T14:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Add ObjectID to Query Layer</title>
      <link>https://community.esri.com/t5/arcmap-questions/add-objectid-to-query-layer/m-p/1007318#M1671</link>
      <description>&lt;P&gt;You can't add an OBJECTID field to a query layer, you have to select one of the participating tables' OBJECTIDs.&lt;/P&gt;&lt;P&gt;SELECT t1.OBJECTID, t1.field1, t2.field1 FROM ... AS t1 JOIN ... AS t2 ON ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 11:32:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/add-objectid-to-query-layer/m-p/1007318#M1671</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2020-12-07T11:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add ObjectID to Query Layer</title>
      <link>https://community.esri.com/t5/arcmap-questions/add-objectid-to-query-layer/m-p/1007349#M1672</link>
      <description>&lt;P&gt;Thanks. I did some testing and found this to be true.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 14:10:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/add-objectid-to-query-layer/m-p/1007349#M1672</guid>
      <dc:creator>tigerwoulds</dc:creator>
      <dc:date>2020-12-07T14:10:06Z</dc:date>
    </item>
  </channel>
</rss>

