I want to only display annotation from an annotation dataset that match the first three characters of the field in the shapefile used to drive a Data Driven Page (DDP) map export. (I'm running the map export through a Python script.)
Let's call the shapefile field that is used in the DDP FIELDNAME_A. Values in FIELDNAME_A have the format 360-2, 386-4, 516-2, etc.
I have an annotation dataset with a field called FIELDNAME_B which contains values of 360, 386, 516, etc.
Would it be to display annotation that matches the first three values in the DDP shapefile? For example:
DDP Shapefile FIELDNAME_A value: 360-2
Annotation data displayed from FIELDNAME_B: 360
Below are two screen captures of the attribute tables.
Data Driven Page shapefile FIELDNAME_A attribute table below
Data Driven Page shapefile FIELDNAME_B attribute table below
The out of the box option for a Definition query does not seem to work, since the values in FIELDNAME_A and FIELDNAME_B do not match.
Is there a query builder or Python work around?