<?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: Inserted rows do not show up in attribute table or attribute window in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197327#M65096</link>
    <description>&lt;P&gt;You can add the reconcile to the script, after the edit session closes.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/reconcile-versions.htm" target="_blank" rel="noopener"&gt;data-management/reconcile-versions&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jul 2022 13:15:58 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-07-29T13:15:58Z</dc:date>
    <item>
      <title>Inserted rows do not show up in attribute table or attribute window</title>
      <link>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197322#M65095</link>
      <description>&lt;P&gt;I created a geoprocessing tool using arcpy/python to insert a row to a table that is versioned.&amp;nbsp; the code works but the inserted row just did not show up in the attribute window under the Edit tab or in the attribute table.&amp;nbsp; My ESRI contact told me to click Refresh at the content pane under "List by Data Source".&amp;nbsp; I think it worked for a while.&amp;nbsp; I started to test the tool again.&amp;nbsp; the Refresh button stopped working.&amp;nbsp; the tools ran without any error and just did not see the new rows.&amp;nbsp; I clicked Reconcile option at the Manage&amp;nbsp; Version window and suddenly all the inserted rows showed up.&amp;nbsp; Wonder what is wrong with my script.&amp;nbsp; Please help.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;Software:&amp;nbsp; ArcGIS Pro 2.9&lt;/P&gt;&lt;P&gt;Database:&amp;nbsp; Oracle and versioned&lt;/P&gt;&lt;P&gt;Below is the part of code which does the inserting:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;inspection_id="12-23-2022"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;edit = arcpy.da.Editor(workspace_sde)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;edit.startEditing(False, True) &lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;# compose row to be inserted into tv asset table&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;flds_tv=[]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;flds_tv.insert(0,"DRAINAGE_ID")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;flds_tv.insert(1,"INSPECTION_ID")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;new_records=[]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;index=0&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;with arcpy.da.SearchCursor(drainage_pipe_layer, ["DRAINAGE_ID"]) as cur:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;for row in cur:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;drainage_id=row[0]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.AddMessage ("drainageid=="+str(drainage_id) +" inspectionid=="+inspection_id)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;print ("table drainageid=="+str(drainage_id))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;newrow=[drainage_id, inspection_id]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;new_records.insert(index, newrow)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;index=index+1&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;# insert values into tv asset table&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;edit.startOperation()&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if (len(new_records)&amp;gt;0): &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.AddMessage ("before insert cursor tv asset path=="+tv_asset_path)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;with arcpy.da.InsertCursor(tv_asset_path, flds_tv) as icur: # get "cannot update table " error &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;for row in new_records:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.AddMessage ("inside insert cursor tv asset path=="+tv_asset_path)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;icur.insertRow(row) &lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;edit.stopOperation() &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;edit.stopEditing(True)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 12:58:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197322#M65095</guid>
      <dc:creator>YinghongLi1</dc:creator>
      <dc:date>2022-07-29T12:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Inserted rows do not show up in attribute table or attribute window</title>
      <link>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197327#M65096</link>
      <description>&lt;P&gt;You can add the reconcile to the script, after the edit session closes.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/reconcile-versions.htm" target="_blank" rel="noopener"&gt;data-management/reconcile-versions&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 13:15:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197327#M65096</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-07-29T13:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inserted rows do not show up in attribute table or attribute window</title>
      <link>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197401#M65097</link>
      <description>&lt;P&gt;Is your script connecting to SDE connected to the DEFAULT version?&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 15:34:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197401#M65097</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-07-29T15:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inserted rows do not show up in attribute table or attribute window</title>
      <link>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197414#M65099</link>
      <description>&lt;P&gt;Yes.&amp;nbsp; I found out my problem.&amp;nbsp; The connection file pointed to the default version.&amp;nbsp; The layers in the map are in my understanding.&amp;nbsp; Somehow my python code inserted rows to the default version; that is why I have to reconcile them to see them.&lt;/P&gt;&lt;P&gt;Now I need to make sure my inserts go to my version.&lt;/P&gt;&lt;P&gt;Thank you all for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 15:46:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inserted-rows-do-not-show-up-in-attribute-table-or/m-p/1197414#M65099</guid>
      <dc:creator>YinghongLi1</dc:creator>
      <dc:date>2022-07-29T15:46:30Z</dc:date>
    </item>
  </channel>
</rss>

