I need to label only the latest feature in a particular feature class. I actually would like to automate it, so that when I will add any new feature to this feature class, the label will automatically be assigned to the latest one. Could anyone please help me with line of code?
Pushkar, I have done the following to answer this question using OBJECTID in a File Geodatabase and it works for me: Within the labeling tab in the layer properties - choose method of Define classes of features and label each class differently Then within the SQL use the following:
"OBJECTID" = (SELECT MAX("OBJECTID") FROM feature_class_name)
Then you can just set your label field to the field you want and only the largest OBJECTID will label.