<?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 ArcGIS Online Feature Layer definition  Duplicate Fields leading to &amp;quot;Data Error&amp;quot; in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-online-feature-layer-definition-duplicate/m-p/330793#M1612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a feature layer that i attempted to delete a field&amp;nbsp;from via the delete field option in Arcgis online. My attempt failed and the field appeared not to have deleted however when i went to access the data i was met with the " data error"&amp;nbsp;and&amp;nbsp; could not see any of the info in the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/511265_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i eventually&amp;nbsp; figured out if i created a view layer of the feature and removed the field in question from the definition i was able to access the layer and see the info. after a bit more investigation i attempted to delete the field again via python and the REST API and this worked I was able to view the data again. I then decided to add the field again via the REST API and in my haste&amp;nbsp; i added the wrong field type&amp;nbsp; and i eventually ended up adding a duplicate field with a different field type.I can still access the info via my view layer but i can no longer delete the field in question i am met with the following error desite two instances of the field name shown in the definition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers" style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;&lt;CODE&gt;Unable to delete feature service layer definition. Cannot drop the index 'db_19692.user_19692.service_86002c906ca94fe6a7ff864677f43c69_SMART_METERING_AUDITS.insights_fl_UgRL5LMuJxfzd1R2', because it does not exist or you do not have permission. Cannot drop the index 'db_19692.user_19692.service_86002c906ca94fe6a7ff864677f43c69_SMART_METERING_AUDITS.insights_fl_UgRL5LMuJxfzd1R2', because it does not exist or you do not have permission. ALTER TABLE DROP COLUMN failed because column 'SO_Number' does not exist in table 'service_86002c906ca94fe6a7ff864677f43c69_SMART_METERING_AUDITS'. (Error Code: 400)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;i also not a duplicate entry in the indexes referenced in the error above&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;insights_fl_UgRL5LMuJxfzd1R2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i feel&amp;nbsp;like this is an issue that may be resolved&amp;nbsp;by updating&amp;nbsp;my definition&amp;nbsp;in some way but i am afraid t touch it again in case i do more damage.&amp;nbsp;&lt;/P&gt;&lt;P&gt;has anyone any advice on how to repair this issue ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Oct 2020 14:17:02 GMT</pubDate>
    <dc:creator>PaulSweeney3</dc:creator>
    <dc:date>2020-10-19T14:17:02Z</dc:date>
    <item>
      <title>ArcGIS Online Feature Layer definition  Duplicate Fields leading to "Data Error"</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-online-feature-layer-definition-duplicate/m-p/330793#M1612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a feature layer that i attempted to delete a field&amp;nbsp;from via the delete field option in Arcgis online. My attempt failed and the field appeared not to have deleted however when i went to access the data i was met with the " data error"&amp;nbsp;and&amp;nbsp; could not see any of the info in the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/511265_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i eventually&amp;nbsp; figured out if i created a view layer of the feature and removed the field in question from the definition i was able to access the layer and see the info. after a bit more investigation i attempted to delete the field again via python and the REST API and this worked I was able to view the data again. I then decided to add the field again via the REST API and in my haste&amp;nbsp; i added the wrong field type&amp;nbsp; and i eventually ended up adding a duplicate field with a different field type.I can still access the info via my view layer but i can no longer delete the field in question i am met with the following error desite two instances of the field name shown in the definition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers" style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;&lt;CODE&gt;Unable to delete feature service layer definition. Cannot drop the index 'db_19692.user_19692.service_86002c906ca94fe6a7ff864677f43c69_SMART_METERING_AUDITS.insights_fl_UgRL5LMuJxfzd1R2', because it does not exist or you do not have permission. Cannot drop the index 'db_19692.user_19692.service_86002c906ca94fe6a7ff864677f43c69_SMART_METERING_AUDITS.insights_fl_UgRL5LMuJxfzd1R2', because it does not exist or you do not have permission. ALTER TABLE DROP COLUMN failed because column 'SO_Number' does not exist in table 'service_86002c906ca94fe6a7ff864677f43c69_SMART_METERING_AUDITS'. (Error Code: 400)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;i also not a duplicate entry in the indexes referenced in the error above&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;insights_fl_UgRL5LMuJxfzd1R2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i feel&amp;nbsp;like this is an issue that may be resolved&amp;nbsp;by updating&amp;nbsp;my definition&amp;nbsp;in some way but i am afraid t touch it again in case i do more damage.&amp;nbsp;&lt;/P&gt;&lt;P&gt;has anyone any advice on how to repair this issue ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2020 14:17:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-online-feature-layer-definition-duplicate/m-p/330793#M1612</guid>
      <dc:creator>PaulSweeney3</dc:creator>
      <dc:date>2020-10-19T14:17:02Z</dc:date>
    </item>
  </channel>
</rss>

