<?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 Re: Unexpected behaviour using arcpy.da.InsertCursor on a column with an attribute domain in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unexpected-behaviour-using-arcpy-da-insertcursor/m-p/1138909#M63621</link>
    <description>&lt;P&gt;Good question - I had the same reaction when I first ran into this.&amp;nbsp; I'm not a database expert but I believe SQL server has the ability to constrain a column to a set of values so I'm curious why this isn't enforced.&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jan 2022 14:53:48 GMT</pubDate>
    <dc:creator>DonMorrison1</dc:creator>
    <dc:date>2022-01-31T14:53:48Z</dc:date>
    <item>
      <title>Unexpected behaviour using arcpy.da.InsertCursor on a column with an attribute domain</title>
      <link>https://community.esri.com/t5/python-questions/unexpected-behaviour-using-arcpy-da-insertcursor/m-p/1138840#M63619</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;one of our customers created a feature class in ArcGIS Pro in the default GDB. He configured an attribute domain with 3 values and assigned it to a specific column in the feature class.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When he is editing the feature class in ArcGIS Pro manually, the customer can only choose between the 3 given values (expected behaviour). On the other hand when the customer ist using the arcpy.da.InsertCursor(...) on this dataset and the specific column, he can write any value into the column.&amp;nbsp;Isn't that against the idea of a domain?&lt;/P&gt;&lt;P&gt;Here are some screenshots:#&lt;/P&gt;&lt;P&gt;(1) manually:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manually.PNG" style="width: 531px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/32699iB6B33CFEE7990347/image-size/large?v=v2&amp;amp;px=999" role="button" title="manually.PNG" alt="manually.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(2) cursor:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cursor.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/32698i856D20DA7861385F/image-size/large?v=v2&amp;amp;px=999" role="button" title="cursor.PNG" alt="cursor.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 12:10:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unexpected-behaviour-using-arcpy-da-insertcursor/m-p/1138840#M63619</guid>
      <dc:creator>Sven_Harpering</dc:creator>
      <dc:date>2022-01-31T12:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected behaviour using arcpy.da.InsertCursor on a column with an attribute domain</title>
      <link>https://community.esri.com/t5/python-questions/unexpected-behaviour-using-arcpy-da-insertcursor/m-p/1138865#M63620</link>
      <description>&lt;P&gt;It could be that domains through arcpy.da are readonly&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/domain.htm" target="_blank"&gt;Domain—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but can be created and managed through arctoolbox&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/add-coded-value-to-domain.htm" target="_blank"&gt;Add Coded Value To Domain (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and there doesn't appear to be any supported environments setting to limit control when used with cursors.&lt;/P&gt;&lt;P&gt;Maybe this is an advantage since you could technically add values without needing to recreate them&amp;nbsp; (haven't tested this... give it a try if you have a sample dataset)&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 13:35:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unexpected-behaviour-using-arcpy-da-insertcursor/m-p/1138865#M63620</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-31T13:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected behaviour using arcpy.da.InsertCursor on a column with an attribute domain</title>
      <link>https://community.esri.com/t5/python-questions/unexpected-behaviour-using-arcpy-da-insertcursor/m-p/1138909#M63621</link>
      <description>&lt;P&gt;Good question - I had the same reaction when I first ran into this.&amp;nbsp; I'm not a database expert but I believe SQL server has the ability to constrain a column to a set of values so I'm curious why this isn't enforced.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 14:53:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unexpected-behaviour-using-arcpy-da-insertcursor/m-p/1138909#M63621</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2022-01-31T14:53:48Z</dc:date>
    </item>
  </channel>
</rss>

