Select to view content in your preferred language

data driven pages and using sql / python queries based on them

2219
5
05-30-2012 10:01 AM
SamVeltre
Emerging Contributor
Hello,

I am trying to use queries based on data driven pages and page definition queries already set. Here is the run down of what I have done / tried:

Created DDP and then on layers applied a PDQ.
Tried to join other layers to the PDQ layers to display only features per specific map.

The problem is I have features that do not have the page name present in their attributes and cannot use the PDQ because of this. These datasets are locked and thus I cannot add fields. I realize I cannot preform the PDQ on a field not containing the DDP names. And in the work around I attempted, I set the PDQ on a layer, join to it, but once joined it does not reflect the PDQ, rather any and all matching records.

Is there any code I can use to reference the specific DDP and then a different field rather then the one the page name is based upon? I am sorry if this is jumbled.

Thank you in advance for any help.
0 Kudos
5 Replies
JoelCalhoun
Deactivated User
Sam,

I'm not sure I'm entirely clear what you are asking, but I don't think you can do exactly what you are asking.
One thought as a work around is to make a copy of your "other layers" that are locked so you can have an editable version. 
Then do a spatial join or other similar operation to add the Index Layer's attributes to your new editable "other layers".
Then you should be able to use the PDQ to show only the features in the selected page.

Another thought is to add a second copy of your index layer and set a PDQ to "Match" the selected page, then use that second copy of the index layer to perform a spatial selection on your "other layers" to get a selected set for your current page.  You could then either just highlight the selected set or output the selected set as a layer for display purposes only.


I hope one of those thoughts help,


Joel
0 Kudos
SamVeltre
Emerging Contributor
Joel,

Thanks for the reply. Your suggestion was the first I tired and would work, but the spatial join / intersect I run creates a many to many scenario and once joined does not always reflect the correct page once the PDQ is applied. Thanks for deciphering my question though!

Sam
0 Kudos
JeffBarrette
Esri Regular Contributor
I'm trying to get my head around this.  Is there any way you can provide a map package or zip with a very small, simple sample?

Jeff
0 Kudos
SamVeltre
Emerging Contributor
Jeff,

Thanks for the reply. Not sure if I will be able to share any data as it is all sensitive. I will have to check with my supervisor to see. Thanks again.
0 Kudos
JeffBarrette
Esri Regular Contributor
If you can't share the data, you can always make up some data.  I just need to see your workflow.

Jeff
0 Kudos