<?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: Best practice with creating tables in script tools in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195396#M14985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't doing it that way, but there is another way, i'm sure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just found this tips: &lt;A class="link-titled" href="https://arcpy.wordpress.com/2013/05/03/adding-fields-perfomance-tips/" title="https://arcpy.wordpress.com/2013/05/03/adding-fields-perfomance-tips/"&gt;Adding Fields: Performance Tips | ArcPy Café&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would it help to make a in memory template first? If i can get over the creation of Field1, i would be lucky. So the problems with different field names ObjectId, OID, OJECTID will still exist and the info format has this additional Rowid-Field, can i ignore them when using an insert cursor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jan 2017 12:45:00 GMT</pubDate>
    <dc:creator>Andreas</dc:creator>
    <dc:date>2017-01-19T12:45:00Z</dc:date>
    <item>
      <title>Best practice with creating tables in script tools</title>
      <link>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195394#M14983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have difficulties to find a straightforward solution for, as i think, a simple task. In a script tool the user has to choose a location to save a table. I used a Table typed input field in the tool parameters, so in my script a get a parameter containing a path and name for the table. In my script i want to use CreateTable_management and AddField_management to structure the table for my needs. Later i use an insert cursor to fill the table.&lt;/P&gt;&lt;P&gt;The problem is, that, depending on what parameter value the user gave, i got different table formats, eg. the user selects a folder and a name without an extension, CreateTable builds an info table, within a geodatabase it builds a gdb table, with folder and extension .dbf it creates dbase table - i don't know how much possibilities there may be further. Creating a table produces different, automatically created fields:&lt;/P&gt;&lt;P&gt;- gdb: ObjectID&lt;/P&gt;&lt;P&gt;- dbf: OID, Field1&lt;/P&gt;&lt;P&gt;- info: Rowid, OBJECTID, FIELD1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't need these automatically created fields, i want my own structure, so : can i suppress the creation of those fields?&lt;/P&gt;&lt;P&gt;What would be a straightforward solution, working with tables in a script tool. I attached an example with code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 11:02:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195394#M14983</guid>
      <dc:creator>Andreas</dc:creator>
      <dc:date>2017-01-19T11:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Best practice with creating tables in script tools</title>
      <link>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195395#M14984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't stop the creation of the required fields.... which you have listed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 12:40:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195395#M14984</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-01-19T12:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Best practice with creating tables in script tools</title>
      <link>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195396#M14985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't doing it that way, but there is another way, i'm sure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just found this tips: &lt;A class="link-titled" href="https://arcpy.wordpress.com/2013/05/03/adding-fields-perfomance-tips/" title="https://arcpy.wordpress.com/2013/05/03/adding-fields-perfomance-tips/"&gt;Adding Fields: Performance Tips | ArcPy Café&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would it help to make a in memory template first? If i can get over the creation of Field1, i would be lucky. So the problems with different field names ObjectId, OID, OJECTID will still exist and the info format has this additional Rowid-Field, can i ignore them when using an insert cursor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 12:45:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195396#M14985</guid>
      <dc:creator>Andreas</dc:creator>
      <dc:date>2017-01-19T12:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Best practice with creating tables in script tools</title>
      <link>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195397#M14986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are pointed in the right direction, i.e., create an in-memory table and use it as a template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding ObjectID, OID, OBJECTID fields, they are "system" fields that aren't directly managed by the user.&amp;nbsp; Although you can retrieve the values in cursors, you won't be able to modify them.&amp;nbsp; For insert cursors, a value will be automatically populated for you when you insert a new record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 15:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/best-practice-with-creating-tables-in-script-tools/m-p/195397#M14986</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-01-19T15:00:42Z</dc:date>
    </item>
  </channel>
</rss>

