I'm trying to label certain features using a specific field (osm_name_58_en). However, when this field is null, I want to label the feature with (som_english_32_name). If both are null then I want to label with the (amenity) field.
This is the code I'm trying but I'm not getting anything in return. Maybe I'm completely out to left field? I'm a python and advanced labeling newbie.
def FindLabel ( [amenity], [osm_english_32_name], [osm_name_58_en] ):
if not ([osm_name_58_en] is None):
return [osm_name_58_en]
elif ([osm_name_58_en] is None and not([osm_english_32_name] is None)):
return [osm_english_32_name] + '\n' + [amenity]
else:
return [amenity];
isnull
ornot isnull
rather thannone
.