<?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 Doh! 8 is not 7! in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645077#M50284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michelle,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well I think your problem is that your Script is taking 7 inputs but your toolbox interface is asking for 8!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to set &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;select SRF grid &lt;/SPAN&gt;&lt;SPAN&gt;to be of type FeatureLayer and have it loaded in arcmap so you can select it from the drop down.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Delete your 7th parameter which is asking for a table, you don't need this as this is output table from your sql query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally for your input &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Selected Join Field "CellID1"&lt;/SPAN&gt;&lt;SPAN&gt; set &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Obtained from&lt;/SPAN&gt;&lt;SPAN&gt; to nothing and set it's default value to &lt;/SPAN&gt;&lt;STRONG&gt;CellID1&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Nov 2011 15:22:03 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2011-11-14T15:22:03Z</dc:date>
    <item>
      <title>Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645069#M50276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created a python script that performs first a table select and then attempt to join the selected attributes from the table to a feature class. I have added the script into MyTool Box in ArcCatalog and set all parameter properties; however, I can not get the tool to work.&amp;nbsp; In fact, the tool can not even run through the table select command.&amp;nbsp; I am not sure if the fact that you have to choose an already created table for the output table in table select is the reason for the execution failure.&amp;nbsp; Any suggestions? I have attached the python script below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michelle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:34:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645069#M50276</guid>
      <dc:creator>MichellePetersen</dc:creator>
      <dc:date>2011-11-08T14:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645070#M50277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michelle,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you upload your toolbox that you have linked your python script to so we can check the parameters. Also give us an example of the sql expression you are adding and maybe a sample of your data (in the format that it is stored as)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645070#M50277</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2011-11-08T14:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645071#M50278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the quick reply. How do you upload the toolbox? I tried to upload the toolbox and it tells me the file is invalid. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The sql expression is "If month = x and year =x"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The table that I want to select by month/year combination is attached below (Wost_Test). This is a sub sample of the data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am unable to attach the shapefile that I wish to join with the table above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michelle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 15:13:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645071#M50278</guid>
      <dc:creator>MichellePetersen</dc:creator>
      <dc:date>2011-11-08T15:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645072#M50279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michelle,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You upload data/toolboxes by zipping them up first...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your sample of data (Wost_Test) is this originally a text file? Convert it to a dbf first.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 15:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645072#M50279</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2011-11-08T15:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645073#M50280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my zipped toolbox.&amp;nbsp; You think I should be using a .dbf of my data rather than .txt?&amp;nbsp; It is originally a .txt file as I output it from SAS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michelle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 16:53:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645073#M50280</guid>
      <dc:creator>MichellePetersen</dc:creator>
      <dc:date>2011-11-08T16:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645074#M50281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have also attached the shapefile which will be joined to the data selected from the table select tool if this would be helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michelle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 17:02:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645074#M50281</guid>
      <dc:creator>MichellePetersen</dc:creator>
      <dc:date>2011-11-08T17:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645075#M50282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michelle,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I downloaded your toolbox and had a look at it. In your initial thread you said that it would not even run the table select part of Python. This bit I have tested only. The parameter setting for your "Output selected data" was incorrect. It's direction was set to input this should be an &lt;/SPAN&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;&lt;SPAN&gt;. This allowed that section of code to execute correctly even with the text file (my idea of dBase was a red herring). This bit of code now generates a table based upon your sql expression which should join to your featureclass.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 09:15:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645075#M50282</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2011-11-09T09:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645076#M50283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the tips.&amp;nbsp; Now I have been able to get the table select portion of the code running, but can not get the join section to work.&amp;nbsp; I am not sure if it is possible to join the selected data from the table select to the feature class because I have designated the selection output as a table.&amp;nbsp; Because I am running both the table select and join from the same toolbox, the table select has not created the output table I can not join this with the feature class. Do you know of a way I could get around this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michelle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 14:21:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645076#M50283</guid>
      <dc:creator>MichellePetersen</dc:creator>
      <dc:date>2011-11-14T14:21:35Z</dc:date>
    </item>
    <item>
      <title>Doh! 8 is not 7!</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645077#M50284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michelle,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well I think your problem is that your Script is taking 7 inputs but your toolbox interface is asking for 8!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to set &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;select SRF grid &lt;/SPAN&gt;&lt;SPAN&gt;to be of type FeatureLayer and have it loaded in arcmap so you can select it from the drop down.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Delete your 7th parameter which is asking for a table, you don't need this as this is output table from your sql query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally for your input &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Selected Join Field "CellID1"&lt;/SPAN&gt;&lt;SPAN&gt; set &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Obtained from&lt;/SPAN&gt;&lt;SPAN&gt; to nothing and set it's default value to &lt;/SPAN&gt;&lt;STRONG&gt;CellID1&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 15:22:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645077#M50284</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2011-11-14T15:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645078#M50285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have went through and edited my toolbox and look at my python code and have attached them below. However, I still can not select the "Output Selected Data" table as the input table for "Selected&amp;nbsp; SRF Data, as this table has not been created because the tool has not run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michelle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 18:41:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645078#M50285</guid>
      <dc:creator>MichellePetersen</dc:creator>
      <dc:date>2011-11-14T18:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645079#M50286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michelle,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like you got confused and removed the wrong parameter from the wrong thing. I have corrected this and uploaded the script and toolbox in a single zip file. You may need to repoint the toolbox to point to the python script as it may have picked up the location where I stored it on my machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you'll see it's not your script that was wrong but the toolbox interface. You were introducing an 8th input which was never used, but your python script only had 7 parameters and it was looking at the table when it really wanted your field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 08:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645079#M50286</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2011-11-15T08:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645080#M50287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This maybe a stupid question, but I am not sure how to get the toolbox you sent displayed under my toolbox. I put yours into my "my toolbox" folder and named it the same as my other one, but it still looks like the toolbox I created. As I stated in my first post, I have never done this before.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure if I sent you the python code that had a workspace in it, but I thought I removed it. Do I need a workspace? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michelle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 12:27:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645080#M50287</guid>
      <dc:creator>MichellePetersen</dc:creator>
      <dc:date>2011-11-15T12:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645081#M50288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michelle,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My toolbox in my opinion is not a good place to store anything as it's in my documents which is a directory on the computer so if that blows up you loose the lot!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would recommend you create a folder in the projects folder and call it something simple like &lt;/SPAN&gt;&lt;STRONG&gt;GeoProcessing&lt;/STRONG&gt;&lt;SPAN&gt;. Then unzip the zip folder into it and you will have your toolbox and the python script in it.&amp;nbsp; You can then use the catalog window in arcmap to navigate to that folder then you'll see the toolbox, navigate into that for the script tool and at that point you will probably want to go into it properties to ensure the python script it's point to is the one in that folder and not my computer!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 12:46:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645081#M50288</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2011-11-15T12:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Python Table Select and Join</title>
      <link>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645082#M50289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you sooo much. It finally works!&amp;nbsp; It would be great if I you would give me your credentials so I can acknowledge you in my work. Thanks Again Duncan for your patients! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michelle&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 15:13:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-table-select-and-join/m-p/645082#M50289</guid>
      <dc:creator>MichellePetersen</dc:creator>
      <dc:date>2011-11-15T15:13:51Z</dc:date>
    </item>
  </channel>
</rss>

