<?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: UpdateCursor Variable Syntax in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/updatecursor-variable-syntax/m-p/36501#M2829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What you want is this. Not sure of the exact syntax for 9.3 might be row.SetValue(...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;row.setValue(inputField,6)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jun 2012 18:36:10 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2012-06-04T18:36:10Z</dc:date>
    <item>
      <title>UpdateCursor Variable Syntax</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-variable-syntax/m-p/36500#M2828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on a script with an updatecursor and running into a syntax problem???I think.&amp;nbsp; My variables are hardcoded at this time, till I get it working.&amp;nbsp; The feature class and field to update are variables.&amp;nbsp; I think line row.inputField = 6 is where I believe I have the problem; line row.LinkID = 5 does work as LinkID is a field name.&amp;nbsp; It is looking for a field by the name of inputField instead of a variable.&amp;nbsp; I'm sure it is something simple.&amp;nbsp; Anyone have a suggestion?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcgisscripting&amp;nbsp; # Create the Geoprocessor object gp = arcgisscripting.create(9.3)&amp;nbsp; # Input Variables inputFC = r"C:\GIS_Work\Temp.gdb\Subs" inputField = "LinkID"&amp;nbsp; cur = gp.UpdateCursor(inputFC) row = cur.Next() while row: &amp;nbsp;&amp;nbsp;&amp;nbsp; #row.LinkID = 5 &amp;nbsp;&amp;nbsp;&amp;nbsp; row.inputField = 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cur.UpdateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp; row = cur.Next() &amp;nbsp;&amp;nbsp;&amp;nbsp; print "Value Added" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "UpdateCursor Works"&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 18:31:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-variable-syntax/m-p/36500#M2828</guid>
      <dc:creator>AlanToms</dc:creator>
      <dc:date>2012-06-04T18:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor Variable Syntax</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-variable-syntax/m-p/36501#M2829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What you want is this. Not sure of the exact syntax for 9.3 might be row.SetValue(...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;row.setValue(inputField,6)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 18:36:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-variable-syntax/m-p/36501#M2829</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-06-04T18:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor Variable Syntax</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-variable-syntax/m-p/36502#M2830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wow total brain lock on my part.&amp;nbsp; Thanks for the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What you want is this. Not sure of the exact syntax for 9.3 might be row.SetValue(...)&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;row.setValue(inputField,6)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 18:46:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-variable-syntax/m-p/36502#M2830</guid>
      <dc:creator>AlanToms</dc:creator>
      <dc:date>2012-06-04T18:46:24Z</dc:date>
    </item>
  </channel>
</rss>

