Relating to my question here, I've been trying to return a value from the attribute table using the following code:

<dyn type="page" property="lu1p"/>

However, even if I try to use a different attribute heading (i.e. lu2p), it only displays "[empty]". Is there something which I'm missing?

The grid index page is actually a set of irregular study areas (i.e. not perfectly square), but it hasn't effected the use of Data Driven Pages. I have looked at the help files for this but have not found any solution.

Edit: As requested, here is a screenshot: enter image description here (https://i.sstatic.net/fPnU0.jpg) available here also

Edit: I'm still having this issue so if anyone could provide an alternative answer, I'd really appreciate it. I tried again in a new mxd and it worked once but then it stopped worked when I re-opened it.

  • so this is a duplicate question you are asking?
    – Mapperz
    Commented Jul 28, 2011 at 15:26
  • No, it isn't a duplicate question, it's related.
    – Emily
    Commented Jul 28, 2011 at 15:29
  • Data Driven Page Name corresponds to the current value of the attribute field set as the name field in the Setup Data Driven Pages dialog box.
    – Mapperz
    Commented Jul 28, 2011 at 15:29
  • I'm not trying to get the page name or number, I'm trying to return a value from the attribute table. It has been done before, but I'm having a problem with it.
    – Emily
    Commented Jul 28, 2011 at 15:31
  • can you post a screenshot please of the setup? attributes are pulled by associated pages.
    – Mapperz
    Commented Jul 28, 2011 at 15:35

2 Answers 2


I finally figured it out. The problem was that the shapefile was joined with a table and therefore would not display any dynamic text.

I thought that a join wouldn't impact the dynamic text but apparently it does.

  • 2
    Export the shapefile with the join and the new shapefile can be used as will export the joined data attribution.
    – Mapperz
    Commented Aug 2, 2011 at 21:49
  • I realise actually now that the join is useless and I have to somehow make the rows in the table I want to join it to into the columns of the table I'm using for data driven pages... But thanks, it will be useful in future. :)
    – Emily
    Commented Aug 2, 2011 at 21:57
  • 2
    Did you try fully qualifying the name. Join tables need fully qualified field names such as tablename.fieldname Commented Aug 4, 2011 at 5:56
  • No, they don't work with dynamic text at all, any join on the grid features and the text will display [empty] or nothing. I'm migrating over the text with cursors today (hopefully).
    – Emily
    Commented Aug 4, 2011 at 14:01

So assuming 'SApeelfinal' is defined in the setup and the dynamic text is Label_1

Any field in the DataDrivenPages index layer table can be used as dynamic text. Use the format:

<dyn type="page" property="Field_Name_Goes_Here"/>

<dyn type="page" property="Label_1"/>

So you could have different text boxes with the following dynamic text but only from SApeelfinal Table :

<dyn type="page" property="Label_1"/>
<dyn type="page" property="SUM_COL9"/>
<dyn type="page" property="SUM_COL10"/>
<dyn type="page" property="SUM_COL11"/>

If you want fields from another table, then you would need to use Python scripting.

  • It sort of worked -- now all it returns is nothing at all -- the fields are there (I changed the font type several times, the box of text changed size but still didn't display anything).
    – Emily
    Commented Jul 28, 2011 at 16:59
  • Could you possibly direct me to a premade script I could use? Would I just put it in the text field?
    – Emily
    Commented Jul 28, 2011 at 20:25
  • 1
    I have a pre-made python module, but it involves running a script tool to refresh the mxd layout when you want the text to be refreshed - probably more complicated than you need. Just create a new shapefile with the joined table's data, like Mapperz said.
    – Tanner
    Commented Aug 3, 2011 at 1:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.