gp.CalculateField_management(fc + "\\Parcels.shp", "SIT_FULL_S", "myfunction(!SIT_HSE_NU!,\"\"!SIT_FULL_S!\"\")", "PYTHON", "def myfunction(fld1,fld2):\n if (fld1=='0'or fld1=='00'or fld1<'00000000000'):\n return ''\n else:\n return fld2")
"def myfunction(fld1,fld2):\n if (fld1=='0'or fld1=='00'or fld1<'00000000000'):\n return ''\n else:\n return fld2"
Missing indentation in your function block's return statements:"def myfunction(fld1,fld2):\n if (fld1=='0'or fld1=='00'or fld1<'00000000000'):\n return ''\n else:\n return fld2"
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.