<?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 Accessing unique attributes for given field in custom tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/accessing-unique-attributes-for-given-field-in/m-p/117099#M9196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm in the process of building a custom process (via Python) and I am thinking about the next step, which is loading it to a toolbox. I need to load it as a tool as I will be distributing it to less confident or entry level users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be really useful for the tool user to be able to access a unique list of attributes for a given field (the same attribute may appear in there many times) and I am wondering about the best way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can easily generate a unique list as part of the script, but am unsure whether this would be exposed to the tool before it actually ran.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did find some information here - &lt;A href="http://blogs.esri.com/esri/arcgis/2011/08/25/generating-a-choice-list-from-a-field/" title="http://blogs.esri.com/esri/arcgis/2011/08/25/generating-a-choice-list-from-a-field/"&gt;Generating a choice list from a field | ArcGIS Blog&lt;/A&gt; - but I am not that familiar (or confident) with ModelBuilder, and from my cursory examination of this, it relies on building your tool, then exporting the code, then attaching the code to a tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if I just want to code it straight up - ie skip ModelBuilder?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a little (or a lot) bamboozled with all of this - if anyone could please explain how to do this with a custom tool (and even better, why it needs to be done that way), preferably in 3 syllable words or less, I would be eternally grateful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other limitation is that the deployment of the tool needs to be able to run with a basic (ArcView) licence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Oct 2014 03:29:36 GMT</pubDate>
    <dc:creator>AnthonyCheesman1</dc:creator>
    <dc:date>2014-10-18T03:29:36Z</dc:date>
    <item>
      <title>Accessing unique attributes for given field in custom tool</title>
      <link>https://community.esri.com/t5/python-questions/accessing-unique-attributes-for-given-field-in/m-p/117099#M9196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm in the process of building a custom process (via Python) and I am thinking about the next step, which is loading it to a toolbox. I need to load it as a tool as I will be distributing it to less confident or entry level users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be really useful for the tool user to be able to access a unique list of attributes for a given field (the same attribute may appear in there many times) and I am wondering about the best way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can easily generate a unique list as part of the script, but am unsure whether this would be exposed to the tool before it actually ran.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did find some information here - &lt;A href="http://blogs.esri.com/esri/arcgis/2011/08/25/generating-a-choice-list-from-a-field/" title="http://blogs.esri.com/esri/arcgis/2011/08/25/generating-a-choice-list-from-a-field/"&gt;Generating a choice list from a field | ArcGIS Blog&lt;/A&gt; - but I am not that familiar (or confident) with ModelBuilder, and from my cursory examination of this, it relies on building your tool, then exporting the code, then attaching the code to a tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if I just want to code it straight up - ie skip ModelBuilder?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a little (or a lot) bamboozled with all of this - if anyone could please explain how to do this with a custom tool (and even better, why it needs to be done that way), preferably in 3 syllable words or less, I would be eternally grateful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other limitation is that the deployment of the tool needs to be able to run with a basic (ArcView) licence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Oct 2014 03:29:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-unique-attributes-for-given-field-in/m-p/117099#M9196</guid>
      <dc:creator>AnthonyCheesman1</dc:creator>
      <dc:date>2014-10-18T03:29:36Z</dc:date>
    </item>
  </channel>
</rss>

