HOW TO
A feature labelled with descriptive text is helpful when there are multiple features available in a close distance. The label displays the values of certain fields from the attribute table. Sometimes, features of one table are associated with features of another table through joins or relates.
To label a feature with multiple records, the feature must be in a permanent one-to-many join. The following steps describe how to do so:
in the attribute table to open the Calculate Field console. Select the newly created field from the Field Name drop-down list, and select Python 3 in the Expression Type drop-down list.isDuplicate(!<Selected_Field_ To_Label>!)
uniqueList=[] def isDuplicate(inValue): if inValue in uniqueList: return 0 else: uniqueList.append(inValue)
button to ensure the expression is valid, and click Run.
'Name:!<Selected_Field_ To_Label>!' if !<New_Field_Name>! is None else " "

def FindLabel ([New_Field_Name],[Field_Name2],[Field_Name3]): myText = [New_Field_Name] if [Field_Name3] == "<Desired_Text>": myText = myText + "<CLR blue = '255'>"+[Field_Name2]+"</CLR>"+ "\n" else: myText = myText + "<CLR red = '255'>"+[Field_Name2]+"</CLR>"+ "\n" return myText

Article ID: 000021133
Get help from ArcGIS experts
Start chatting now