Apparently the Python parser can't deal with empty inputs, but also can't deal with inputs which are not on the if-else list of options.
def coname(CO): if CO == None: return "None" if CO == '067': return "Fayette" elif CO == '209': return "Scott" else: return CO
the errors are Error 999999: Error executing functionThe field is not nullable (MAP_LABEL)Failed to execute (Calculate field)
def coname(CO): if CO=='067': return "Fayette" elif CO=='209': return "Scott" elif CO=='239': return "Woodford" elif CO=='017': return "Bourbon" elif CO=='049': return "Clark" elif CO=='073': return "Franklin" elif CO=='081': return "Grant" elif CO=='097': return "Harrison" elif CO=='187': return "Owen"
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.