Solved! Go to Solution.
def FindLabel([PartyName], [PID]): Party, PID = [PartyName], [PID] YourLabel = '' if ',' in Party: Party = Party.split(',') YourLabel = Party[0].strip() + ', ' + Party[1].strip()[0:1] + '.' elif len(Party) > 13: YourLabel = Party[0:13] else: YourLabel = Party YourLabel = YourLabel + '\n' + PID return YourLabel
before...
def FindLabel([PartyName], [PID]): Party, PID = [PartyName], [PID] YourLabel = '' if ',' in Party: Party = Party.split(',') YourLabel = Party[0].strip() + ', ' + Party[1].strip()[0:1] + '.' elif len(Party) > 13: YourLabel = Party[0:13] else: YourLabel = Party YourLabel = YourLabel + '\n' + PID return YourLabel