I am creating a python script and have a question about the row.SetValue() function. I have read in a table and a feature class along with a string value that represents one of the fields in the feature class. I join the table to the feature class and perform some calculations. Based on the result from those calculations, I then need to set the value of the of the field denoted by the string value. I am not sure what the proper code (if this is even possible) to do this. Here is what I have tried.
First, I tried to set the 'SchoolLevel' field to a value:
[INDENT]row.SetValue(SchoolLevel, M[0][1])[/INDENT]
I am pretty sure that this doesn't work because there is a join.
So, then I tried to add in the name of the feature class to the code as such:
[INDENT]row.SetValue(Scenario_Template_1011.SchoolLevel, M[0][1])[/INDENT]
This didn't work, so then I tried to put the feature class name in quotes:
[INDENT]row.SetValue("Scenario_Template_1011."SchoolLevel, M[0][1][/INDENT]
This throws me an invalid syntax error before I can even run the script. This makes sens, but I am not sure how to correctly code this up.
Basically, Scenario_Template_1011 is the name of the feature class that is joined by another table and SchoolLevel is a variable representing a field in Scenario_Template_1011. I am trying to set the value of that field using a cell in a matrix that I created.
Thanks in advance for any help!