<?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 UpdateCursor help in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704922#M54557</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having issues using the update cursor function. This is what I have written, I get no errors but it does nothing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;with&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; arcpy.da.UpdateCursor("test1", ["SYM", "FLD_ZONE","Label", "ZONE_SUBTY"]) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; rows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -5.0pt; margin: 0in 0in .0001pt 5.0pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; row &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; rows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -5.0pt; margin: 0in 0in .0001pt 5.0pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; row[3] == "" and row[1] &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; ["A", "AE", "AH", "AO", "VE"]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -5.0pt; margin: 0in 0in .0001pt 5.0pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row[0] = 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -5.0pt; margin: 0in 0in .0001pt 5.0pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row[2] = row[1]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rows.updateRow(row)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;basically if row[3] is empty and row[1] has these " " , update these rows with this&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2019 17:02:51 GMT</pubDate>
    <dc:creator>RyanPhillips2</dc:creator>
    <dc:date>2019-01-23T17:02:51Z</dc:date>
    <item>
      <title>UpdateCursor help</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704922#M54557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having issues using the update cursor function. This is what I have written, I get no errors but it does nothing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;with&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; arcpy.da.UpdateCursor("test1", ["SYM", "FLD_ZONE","Label", "ZONE_SUBTY"]) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; rows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -5.0pt; margin: 0in 0in .0001pt 5.0pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; row &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; rows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -5.0pt; margin: 0in 0in .0001pt 5.0pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; row[3] == "" and row[1] &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #004da8;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; ["A", "AE", "AH", "AO", "VE"]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -5.0pt; margin: 0in 0in .0001pt 5.0pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row[0] = 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -5.0pt; margin: 0in 0in .0001pt 5.0pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row[2] = row[1]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rows.updateRow(row)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;basically if row[3] is empty and row[1] has these " " , update these rows with this&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 17:02:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704922#M54557</guid>
      <dc:creator>RyanPhillips2</dc:creator>
      <dc:date>2019-01-23T17:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor help</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704923#M54558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/script-formatting"&gt;/blogs/dan_patterson/2016/08/14/script-formatting&lt;/A&gt;&amp;nbsp; so line numbers can be referred to&amp;nbsp; Ryan&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; None &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"A"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"AE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"AH"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"AO"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"VE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;assuming you don't have any spaces in row[3], in which case you would have to do another 'in' test for&amp;nbsp;&lt;/P&gt;&lt;P&gt;ie row[3] in [" ", None]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 17:13:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704923#M54558</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-01-23T17:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor help</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704924#M54559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for replying so quickly. The code works however it is still not populating anything into the fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 21:10:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704924#M54559</guid>
      <dc:creator>RyanPhillips2</dc:creator>
      <dc:date>2019-01-23T21:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor help</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704925#M54560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; font-family: inherit; font-size: 10pt; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: -6.66px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;["A", "AE", "AH", "AO", "VE"&lt;/SPAN&gt;] &amp;nbsp;&lt;/P&gt;&lt;P&gt;are those the exact codes that are in there?&lt;/P&gt;&lt;P&gt;throw print statements in before the if statement to print out the contents of row[3] and row[1]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 21:54:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-help/m-p/704925#M54560</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-01-23T21:54:59Z</dc:date>
    </item>
  </channel>
</rss>

