<?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: list field values - if statement in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/list-field-values-if-statement/m-p/371714#M29395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lara,&lt;/P&gt;&lt;P&gt;You can specify a whereclause in your cursor. This is the second and optional parameter of the function.&lt;/P&gt;&lt;P&gt;Please refer to the help page of the &lt;A href="http://help.arcgis.com/fr/arcgisdesktop/10.0/help/index.html#//000v00000039000000"&gt;search cursor&lt;/A&gt;, and for &lt;A href="http://help.arcgis.com/fr/arcgisdesktop/10.0/help/00s5/00s50000002t000000.htm"&gt;building the SQL whereclause.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you are using a 10.1 version or above, you might use data acces module (arcpy.da.SearchCursor) for performance improvement.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jan 2015 21:55:19 GMT</pubDate>
    <dc:creator>JérémiePedoia</dc:creator>
    <dc:date>2015-01-19T21:55:19Z</dc:date>
    <item>
      <title>list field values - if statement</title>
      <link>https://community.esri.com/t5/python-questions/list-field-values-if-statement/m-p/371713#M29394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;With help of this code I am able to summarize the Area field values of the Geology layer. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; font-size: 14.3999996185303px;"&gt;&lt;SPAN style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 14.3999996185303px;"&gt;&lt;SPAN style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;list = [r.Area for r in arcpy.SearchCursor(Geology)]&amp;nbsp;&amp;nbsp; # &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14.3999996185303px;"&gt;Area&lt;/SPAN&gt;&lt;SPAN style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; is the attribute field that you want to list&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; font-size: 14.3999996185303px;"&gt;&lt;SPAN style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 14.3999996185303px;"&gt;&lt;SPAN style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;How can I bring an if statement into this code? I only want to list the Area field values if the field &lt;/SPAN&gt;&lt;SPAN style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"Description" == "Silicate"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; font-size: 14.3999996185303px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 14.3999996185303px;"&gt;I am very thankful for any suggestions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 15:26:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-field-values-if-statement/m-p/371713#M29394</guid>
      <dc:creator>LaraFaelivrin</dc:creator>
      <dc:date>2015-01-19T15:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: list field values - if statement</title>
      <link>https://community.esri.com/t5/python-questions/list-field-values-if-statement/m-p/371714#M29395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lara,&lt;/P&gt;&lt;P&gt;You can specify a whereclause in your cursor. This is the second and optional parameter of the function.&lt;/P&gt;&lt;P&gt;Please refer to the help page of the &lt;A href="http://help.arcgis.com/fr/arcgisdesktop/10.0/help/index.html#//000v00000039000000"&gt;search cursor&lt;/A&gt;, and for &lt;A href="http://help.arcgis.com/fr/arcgisdesktop/10.0/help/00s5/00s50000002t000000.htm"&gt;building the SQL whereclause.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you are using a 10.1 version or above, you might use data acces module (arcpy.da.SearchCursor) for performance improvement.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 21:55:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-field-values-if-statement/m-p/371714#M29395</guid>
      <dc:creator>JérémiePedoia</dc:creator>
      <dc:date>2015-01-19T21:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: list field values - if statement</title>
      <link>https://community.esri.com/t5/python-questions/list-field-values-if-statement/m-p/371715#M29396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks that worked!:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 10:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-field-values-if-statement/m-p/371715#M29396</guid>
      <dc:creator>LaraFaelivrin</dc:creator>
      <dc:date>2015-01-26T10:09:51Z</dc:date>
    </item>
  </channel>
</rss>

