I'm trying to create a model to do field calculations using 3 fields for parameters. I get the attached syntax error when I do. I'm successful in using 2 fields as parameters but when I add the 3rd, I get the error. Is there a limit or am I doing something else wrong?
Other suggestions for doing field calculations which could be easily modified by another.
Attached is the field calculator w/ code and error.
Any help would be very much appreciated. Thank you!
Thanks for the quick reply. I thought it was adding the 3rd field but it seems that it is the 3rd field that I've added that's the problem. If I only add this one field which is a text field with coded-value domain, it fails.
Error: Executing (Calculate Field): CalculateField "Existing Guide Rails" compliance calcCompliance(!rail_alignment!) PYTHON_9.3 "def calcCompliance(align):\n return None\n" Start Time: Wed Nov 21 13:20:35 2012 ERROR 000539: <type 'exceptions.SyntaxError'>: invalid syntax (<expression>, line 1) Failed to execute (Calculate Field). Failed at Wed Nov 21 13:20:35 2012 (Elapsed Time: 0.00 seconds)
If I change the field used in the expression it works just fine. The field is a text field, length 25, and does contain double quotes. But one other field I tried has double quotes (but only 1 per record, the field that it fails on has some records with 2 double quotes as such: 6" - 12" Out of Alignment. Would it be failing because of that?