Entering these lines of Python one at a time works like a charm… Just need one more seemingly simply issue solved…
How do we place multiple lines of Python code into ArcGIS's Field Calculator without producing Error 000539 or syntax error?
I've tried several different syntaxes with colons and various spacings / returns …. screen shot:
multiple lines of Python code here:
'1201-LT 210A' if !sc2! in (12013,11999,11998,12016,12015,12004,12012,12011,12001,12002,11997,12017,12009,12003) else !March_Proj!
'1201-LT 210B' if !sc2! in (12074,12076,12078,12072) else !March_Proj!
'1201-BO' if !sc2! in (20052,20053,20044,20045,20039,20050,20051,24157,24158,22927,24783,24785,24784,24782,24035,22924,23923,24154,22528,21912,23164) else !March_Proj!
'1202-LT 21F' if !sc2! in (1067,1066,1078,1060,1052,1075,1068,1051,1079,1062,1070,,1071) else !March_Proj!
Best Answer
I don't have ArcGIS 10 (yet), but from I read, you need to define a function:
Then at the bottom (the next box), you would call the function: