Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 (http://i.imgur.com/8FXwS.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.

share|improve this question
    
so this is a duplicate question you are asking? –  Mapperz Jul 28 '11 at 15:26
    
No, it isn't a duplicate question, it's related. –  Emily Jul 28 '11 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 Jul 28 '11 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 Jul 28 '11 at 15:31
    
can you post a screenshot please of the setup? attributes are pulled by associated pages. –  Mapperz Jul 28 '11 at 15:35
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
2  
Export the shapefile with the join and the new shapefile can be used as will export the joined data attribution. –  Mapperz Aug 2 '11 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 Aug 2 '11 at 21:57
1  
Did you try fully qualifying the name. Join tables need fully qualified field names such as tablename.fieldname –  Craig Williams Aug 4 '11 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 Aug 4 '11 at 14:01
add comment

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.

share|improve this answer
    
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 Jul 28 '11 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 Jul 28 '11 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 Aug 3 '11 at 1:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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