<?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: Modelbuilder and Field calculator for Fields at a parameter table in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/modelbuilder-and-field-calculator-for-fields-at-a/m-p/421786#M33124</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;First Parameter&amp;nbsp;should be&amp;nbsp;Table and For second parameter, You can use Obtain From Parameter property as Excel Sheet. Please review attached snapshot for details.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/399784_2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Mar 2018 11:57:10 GMT</pubDate>
    <dc:creator>Madanbhurati</dc:creator>
    <dc:date>2018-03-25T11:57:10Z</dc:date>
    <item>
      <title>Modelbuilder and Field calculator for Fields at a parameter table</title>
      <link>https://community.esri.com/t5/python-questions/modelbuilder-and-field-calculator-for-fields-at-a/m-p/421784#M33122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp;have an Excel sheet enter it to model builder as a parameter and at next steps i need to create an expression for the fields inside the table and add the results to another field. The problem is the fields not exist to select for expression at field calculator.&lt;/P&gt;&lt;P&gt;So is there any way to solve this problem and how could i write ^ inside expression. I have Arc GIS 10.5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still new in python programming so,I tried to&amp;nbsp;see some&amp;nbsp;python code from the available codes&amp;nbsp; but it give me an error Invalid field..&lt;/P&gt;&lt;P&gt;I wish to know what is the problem inside the code&lt;/P&gt;&lt;P&gt;Table name: #it will be parameter&lt;/P&gt;&lt;P&gt;Fields at table need to enter at expression: Geco, Par, kela (All numbers i consider all as float)&lt;/P&gt;&lt;P&gt;The new field for the results is MM&lt;/P&gt;&lt;P&gt;The code i tried with is:&lt;/P&gt;&lt;P&gt;Geco = arcpy.GetParameterAsFloat()&lt;/P&gt;&lt;P&gt;Par = arcpy.GetParameterAsFloat()&lt;/P&gt;&lt;P&gt;kela = arcpy.GetParameterAsFloat()&lt;/P&gt;&lt;P&gt;Geco_new = '!'+Geco+'!'&lt;/P&gt;&lt;P&gt;Par_new = '!'+Par+'!'&lt;/P&gt;&lt;P&gt;kela_new = '!'+kela+'!'&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(outputfc, percentfield, '('+Geco_new+'*(2/'+Par_new+')^'+kela_new+'))', "PYTHON") So, please need your help and i appreciate that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Mar 2018 09:36:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/modelbuilder-and-field-calculator-for-fields-at-a/m-p/421784#M33122</guid>
      <dc:creator>RanaElKady</dc:creator>
      <dc:date>2018-03-25T09:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder and Field calculator for Fields at a parameter table</title>
      <link>https://community.esri.com/t5/python-questions/modelbuilder-and-field-calculator-for-fields-at-a/m-p/421785#M33123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your python IDE should have raised a number of errors&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;GetParameterAsFloat&amp;nbsp; is not an arcpy method perhaps &amp;nbsp;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/functions/getparameterastext.htm"&gt;http://pro.arcgis.com/en/pro-app/arcpy/functions/getparameterastext.htm&lt;/A&gt; but you have to provide parameter numbers&lt;/LI&gt;&lt;LI&gt;&lt;DIV&gt;Geco_new = '!'+Geco+'!'&lt;BR /&gt;Traceback (most recent call last):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; File "&amp;lt;ipython-input-1-80b166027750&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geco_new = '!'+Geco+'!'&lt;/DIV&gt;&lt;DIV&gt;NameError: name 'Geco' is not defined&lt;/DIV&gt;Your string concatenation is wrong since Geco doesn't exist as a variable.&amp;nbsp; Perhaps you meant&amp;nbsp;&lt;STRONG&gt;Geco_new = '!Geco!'&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You report any and all error messages when trying to get help with code samples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Mar 2018 11:43:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/modelbuilder-and-field-calculator-for-fields-at-a/m-p/421785#M33123</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-25T11:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder and Field calculator for Fields at a parameter table</title>
      <link>https://community.esri.com/t5/python-questions/modelbuilder-and-field-calculator-for-fields-at-a/m-p/421786#M33124</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;First Parameter&amp;nbsp;should be&amp;nbsp;Table and For second parameter, You can use Obtain From Parameter property as Excel Sheet. Please review attached snapshot for details.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/399784_2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Mar 2018 11:57:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/modelbuilder-and-field-calculator-for-fields-at-a/m-p/421786#M33124</guid>
      <dc:creator>Madanbhurati</dc:creator>
      <dc:date>2018-03-25T11:57:10Z</dc:date>
    </item>
  </channel>
</rss>

