Hi,
I am trying to put together a python script that among other things allows the user to input a given feature class, select a field from it and pass that field along as a variable in the field calculator. In the attached code sample the calculation is on line 35, I need !HT_FT! to have the ability to be modifiable, because when we receive these feature classes from the client, that field of tree heights does not always have the same name. I tried creating a variable in line 30, but that did not work (it is now commented out so it doesn't interfere with the rest of the script). I was hoping to set up a system that would allow the user input the workspace, feature class we receive, and select a field from that feature class to base all other calculations (as in the attached tool and parameters screenshots. However, whenever I run that I get an error that says "the field has not been defined." Any help is greatly appreciated.
Thanks!
John