AnsweredAssumed Answered

Modelbuilder and Field calculator for Fields at a parameter table

Question asked by ranageologist.m2 on Mar 25, 2018
Latest reply on Mar 25, 2018 by m.bhuratiopenware-com-kw-esridist

I 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.

So is there any way to solve this problem and how could i write ^ inside expression. I have Arc GIS 10.5.


I still new in python programming so,I tried to see some python code from the available codes  but it give me an error Invalid field..

I wish to know what is the problem inside the code

Table name: #it will be parameter

Fields at table need to enter at expression: Geco, Par, kela (All numbers i consider all as float)

The new field for the results is MM

The code i tried with is:

Geco = arcpy.GetParameterAsFloat()

Par = arcpy.GetParameterAsFloat()

kela = arcpy.GetParameterAsFloat()

Geco_new = '!'+Geco+'!'

Par_new = '!'+Par+'!'

kela_new = '!'+kela+'!'

arcpy.CalculateField_management(outputfc, percentfield, '('+Geco_new+'*(2/'+Par_new+')^'+kela_new+'))', "PYTHON") So, please need your help and i appreciate that