I'm trying to calculate new values for a field based on two other fields. In VB I don't have any problem, but I need to use python to publish my gp service.
Taking account of the comments by @nmpeterson and myself against your question, I would try the following:
Pre-logic Script Code:
def a(Riesgo,Direccion):
if (Riesgo == "Alto" and Direccion == "Sur"):
return "Sur"
Mensaje =
a(!Riesgo!,!Dirección!)
ó
inDirección
. Perhaps try a standardo
instead?if
and two more spaces beforereturn
.