<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Data Driven Pages-Restrict Indexed Feature in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569148#M6189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This works great if the data is stored in the same database.&amp;nbsp; However, that is another hurdle I must overcome.&amp;nbsp; The Map Layer is in an SDE database, that I do not have adequate privledges to alter the schema as I would need it, and the Pages Layer is in a File GDB.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I really wish I could just write a definition query on a layer based upon a sub query from another layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Map Layer: GLOBALID IN (SELECT GLOBALID FROM DDP_LAYER)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jul 2011 18:50:59 GMT</pubDate>
    <dc:creator>JasonMoore</dc:creator>
    <dc:date>2011-07-19T18:50:59Z</dc:date>
    <item>
      <title>Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569140#M6181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm creating a series of Data Driven pages at a fixed scale of 1:12000.&amp;nbsp; I have multiple features in my index layer that, at that scale, appear within the data frame.&amp;nbsp; I'd like to be able to restrict the feature that appears within the data frame to only the one feature defined by the indexing for that page.&amp;nbsp; Is there an easy way to do this?&amp;nbsp; Used to be able to do this in DSMapbook by clicking "Restrict display to active feature"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 18:00:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569140#M6181</guid>
      <dc:creator>BarbaraMcIntosh</dc:creator>
      <dc:date>2011-06-24T18:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569141#M6182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You should check out &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00sr00000004000000.htm"&gt;Page Definition Queries&lt;/A&gt;&lt;SPAN&gt;. They are meant to restrict features based on the data driven page displayed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 18:48:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569141#M6182</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2011-06-24T18:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569142#M6183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks...works great...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 19:44:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569142#M6183</guid>
      <dc:creator>BarbaraMcIntosh</dc:creator>
      <dc:date>2011-06-24T19:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569143#M6184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This seems to be limited to the field used for the PageName.&amp;nbsp; Is there a way to Query a layer based off of a different field in the Data Driven Pages Layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to make the Page Definition Query look at Field 2 but the PageName be pulled from Field 1 in the Data Driven Pages (DDP) layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DDP Layer: Field 1 (PageName), Field 2 (Global ID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Map Layer: Field 1 (Map Reference), Field 2(Global ID)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 12:07:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569143#M6184</guid>
      <dc:creator>JasonMoore</dc:creator>
      <dc:date>2011-07-19T12:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569144#M6185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know of a way to apply a Page Definition to a field other than the Page Name, but you should be able to join the DDP Layer to the Map Layer table to access the matching Page Names.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; DDP Layer: Field1 (PageName), Field2 (Global ID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Map Layer: Field1 (Map Reference), Field2(Global ID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; JOIN -&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Map Layer: Map.Field1 (Map Reference), Map.Field2 (Global ID), DDP.Field2 (Global ID), DDP.Field1 (PageName)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 14:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569144#M6185</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2011-07-19T14:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569145#M6186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your promt reply.&amp;nbsp; I tried your solution and came up bust.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That would work under most normal circumsances.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the problem is that when you join the two layers the each Global_ID actually has two PageName record associated with them, so there isn't a unique match that way.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 14:34:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569145#M6186</guid>
      <dc:creator>JasonMoore</dc:creator>
      <dc:date>2011-07-19T14:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569146#M6187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm pretty sure this is what you want: &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/37544"&gt;Make Query Table&lt;/A&gt;&lt;SPAN&gt;. You need a many-to-one join between your map layer (many) and data driven pages (one), based on Global ID being equal.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 18:05:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569146#M6187</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2011-07-19T18:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569147#M6188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks again for your prompt reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will look into this and let you know of the outcome.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 18:29:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569147#M6188</guid>
      <dc:creator>JasonMoore</dc:creator>
      <dc:date>2011-07-19T18:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569148#M6189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This works great if the data is stored in the same database.&amp;nbsp; However, that is another hurdle I must overcome.&amp;nbsp; The Map Layer is in an SDE database, that I do not have adequate privledges to alter the schema as I would need it, and the Pages Layer is in a File GDB.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I really wish I could just write a definition query on a layer based upon a sub query from another layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Map Layer: GLOBALID IN (SELECT GLOBALID FROM DDP_LAYER)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 18:50:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569148#M6189</guid>
      <dc:creator>JasonMoore</dc:creator>
      <dc:date>2011-07-19T18:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569149#M6190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have found a work around. PYTHON saved the day again.&amp;nbsp; Something like the following.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import Modules&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set Variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxdpath = r'FULL PATH TO MXD FILE' # string &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputfolder = 'FULL PATH TO OUTPUT FOLDER' # string &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;namefield = 'THE FIELD CONTAINING THE NAME OF THE RESULTING PDF FILE' # string &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;queryfield = 'THE FIELD CONTAINING THE VALUE FOR THE DESIRED QUERY' # string &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;layers = ['LIST','OF','LAYERS'] # list&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument(mxdpath)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Start Loop through Data Driven Pages&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum # set the current page&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; pageName = mxd.dataDrivenPages.pageRow.getValue(field) # get the pageName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; pageName += '.pdf' # add '.pdf' extension for file name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; pdf = os.path.join(outputfolder, pageName) # add pageName to output folder to get full output path&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; # Start Loop through all layers of mxd file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; for lyr in arcpy.mapping.ListLayers(mxd)&amp;nbsp; # for every layer in mxd's Layer List&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.name in layers: # if layer name in user input list above&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = mxd.DataDrivenPages.pageRow.getValue(queryfield) # get the value out of the query field&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.defintionQuery == True:&amp;nbsp; # if a defintionQuery Exsts...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query = lyr.defintionQuery + "AND QueryField = \'%s\'" % (value) # Add the new to the old&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query = "QueryField = \'$s\'" % (value) # else create a new query&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.defintionQuery = query&amp;nbsp; # set the layers defintionQuery&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Next' # else print next, this isn't necassary, but its a good place holder&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToPDF(mxd, pdf) # export the current Page to pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd, lyr, pageName, pageNum, query, value&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2011 20:02:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569149#M6190</guid>
      <dc:creator>JasonMoore</dc:creator>
      <dc:date>2011-07-25T20:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569150#M6191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It dropped the indentation, so be careful.&amp;nbsp; Sorry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2011 20:03:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569150#M6191</guid>
      <dc:creator>JasonMoore</dc:creator>
      <dc:date>2011-07-25T20:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569151#M6192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just as an FYI.&amp;nbsp; If you highlight your code and click the # button it will wrap your code in special CODE tags so you don't lose the python indentation.&amp;nbsp; For example - not 100% sure I got your indents correct:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import Modules
import arcpy, os

# Set Variables
mxdpath = r'FULL PATH TO MXD FILE' # string 
outputfolder = 'FULL PATH TO OUTPUT FOLDER' # string 
namefield = 'THE FIELD CONTAINING THE NAME OF THE RESULTING PDF FILE' # string 
queryfield = 'THE FIELD CONTAINING THE VALUE FOR THE DESIRED QUERY' # string 
layers = ['LIST','OF','LAYERS'] # list

mxd = arcpy.mapping.MapDocument(mxdpath)
# Start Loop through Data Driven Pages
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1)
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum # set the current page
&amp;nbsp;&amp;nbsp;&amp;nbsp; pageName = mxd.dataDrivenPages.pageRow.getValue(field) # get the pageName
&amp;nbsp;&amp;nbsp;&amp;nbsp; pageName += '.pdf' # add '.pdf' extension for file name
&amp;nbsp;&amp;nbsp;&amp;nbsp; pdf = os.path.join(outputfolder, pageName) # add pageName to output folder to get full output path
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Start Loop through all layers of mxd file
&amp;nbsp;&amp;nbsp;&amp;nbsp; for lyr in arcpy.mapping.ListLayers(mxd) # for every layer in mxd's Layer List
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.name in layers: # if layer name in user input list above
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = mxd.DataDrivenPages.pageRow.getValue(queryfield) # get value of query field
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.defintionQuery == True: # if a defintionQuery Exsts...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query = lyr.defintionQuery + "AND QueryField = \'%s\'" % (value) # Add new to old
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query = "QueryField = \'$s\'" % (value) # else create a new query
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.defintionQuery = query # set the layers defintionQuery
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Next' # else print next, this isn't necassary, but its a good place holder

arcpy.mapping.ExportToPDF(mxd, pdf) # export the current Page to pdf
del mxd, lyr, pageName, pageNum, query, value &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:30:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569151#M6192</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-12-12T00:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Data Driven Pages-Restrict Indexed Feature</title>
      <link>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569152#M6193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, that is nice to know.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 13:56:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/data-driven-pages-restrict-indexed-feature/m-p/569152#M6193</guid>
      <dc:creator>JasonMoore</dc:creator>
      <dc:date>2011-07-26T13:56:45Z</dc:date>
    </item>
  </channel>
</rss>

