All, I am creating a map book of the United States using DDP with ArcGIS 10.0.
I am using a layer of the extents of each state as the DDP index. From the layer, I am using the layer attribute StateName as the Name Field and the Sort Field when I create the DDP.
I also have a mask layer that I would like to use to mask the surrounding states. For example, if I am making a single map of California, I would create a definition query in the layer properties. So for California the mask definition query would be:
StateName <> 'California'
Then of course the mask layer would draw all of the state polygons surrounding California and the California polygon would not draw.
I would like to find a way were StateName would auto-magically be filled into the definition query as I click on the Next Page or Previous Page command on the DDP toolbar. So when the map moves from Arkansas to California the mask lay query changes to match the map page.
John, Thanks so much for the reply, that was exactly what I needed! I was hoping that there was a simple non-python solution.
I searched for "Definition Query" in the help and as you can see on the ESRI help link below and in the screen shot that is attached, they do not even show that command on Definition Query tab of the Layer Properties. This is in the 10.1 help too.