I am working with some data for property leases in Texas, some of the areas have historic data where it will show all of the owners of the property so when i try and label it some areas will have several names over them. I need to get it to ownly show the newest set of data for each property. The data has an expiration date on the lease for each owner and the leases are connected through a common FID. I was thinking about trying to a definition query to get the latest data out but I cant think of a way that it would work. Any help would be REALLY appreciated.
If all of the attributes are contained with the property leases feature class, you can run a Dissolve. You will want to specify the FID field to dissolve on and the Date field as a MAX statistic. Ex:
You could probably create a python script go through the data and set a flag (in a new field) that indicates which is the active lease feature.
Depending on your data source, you can use arcpy.da.UpdateCursor and order the results by FID and date using an ORDER BY in the SQL clause.
eg. sql_clause=(None, 'ORDER BY FID, EXPIRY_DATE DESC')
Then loop through the rows of the resulting cursor and set the flag only for the first record of each FID.
This way you can either use the resulting flag in a definition query on the layer to show only active leases on the map, or you can use it to create a label class in the labelling properties so that only active leases get labelled.