I am attempting to label features that can have multiple combinations of codes. The label is based off of three fields ([DescriptionA], [DescriptionB], [DescriptionC]).
I'd like to create a python expression to remove all null values from the labels, and to remove a section from the end of each returned value.
(Ex. 10QR, 15QR)
Here is the code I have come up with based on a similar thread I've read:
def FindLabel ( [DescriptionA], [DescriptionB], [DescriptionC] ):
return def FindLabel ( [DescriptionA], [DescriptionB], [DescriptionC] ):
if not ([DescriptionC] is None):
return [DescriptionC] .lstrip('Fuse-')
elif not([DescriptionB] is None):
return [DescriptionB] .lstrip('Fuse-') + '\n' + [DescriptionA] .lstrip('Fuse-')
elif not([DescriptionA] AND [DescriptionB] AND [DescriptionC] is None):
return [DescriptionA] .lstrip('Fuse-') + '\n' + [DescriptionB] .lstrip('Fuse-') + '\n' + [DescriptionC] .lstrip('Fuse-')
else:
return [DescriptionA] .lstrip('Fuse-')
When I verify, it returns a syntax error message. I am sure there is more wrong to it than that. How should I proceed?