is it possible to create Dynamic Text that reads Domain/Subtype?

4611
8
Jump to solution
10-15-2013 10:31 AM
ShanaHarmsen
New Contributor II
I am creating a map book with data driven pages, using dynamic text with an attribute field with the help tip below...

TIP:
With the dyn type="page" you can create dynamic text with any attribute field of the Data Driven Pages index layer. For example, if you have an attribute on the index layer named POPULATION, you can create a dynamic text tag using this field, <dyn type="page" property="POPULATION"/> to dynamically display the POPULATION values for each page in the layout.

With this functionality if you have an attribute field in an index layer of your data driven pages you can use it as dynamic text for the pages

I have tried it with a field that uses a coded subtype, and just the numeric code will show - is there any way to display the coded value instead?

Thanks!
0 Kudos
1 Solution

Accepted Solutions
MattSayler
Occasional Contributor II
That "domainlookup" attribute is the only thing I'm finding too. I think it may be new as of 10.1, as setting it true or false doesn't change anything for me either and I'm not finding it in the 10.0 help docs.

Not sure it's what you're looking for, but you could get around it in a script:
domainDict = {1:"Foo Type",2:"Bar Type",3:"Other Thing"} alias = domainDict[mxd.dataDrivenPages.pageRow.getValue("YourFieldName")] yourElement.text = alias

View solution in original post

0 Kudos
8 Replies
RobertBorchert
Frequent Contributor III
It should work just fine. I just did it to try it out before responding and it put in my subtype as the value not the numeric code.

What method did you use to insert the dynamic label?

You should click on

Insert>Dynamic Text>Data Driven Page Attribute. Then select from the drop down list your Subtype Field.

It should look like this

<dyn type="page" property="attribute" field="subtypeCode" domainlookup="true"/>

I am creating a map book with data driven pages, using dynamic text with an attribute field with the help tip below...  

TIP:
With the dyn type="page" you can create dynamic text with any attribute field of the Data Driven Pages index layer. For example, if you have an attribute on the index layer named POPULATION, you can create a dynamic text tag using this field, <dyn type="page" property="POPULATION"/> to dynamically display the POPULATION values for each page in the layout.

With this functionality if you have an attribute field in an index layer of your data driven pages you can use it as dynamic text for the pages


I have tried it with a field that uses a coded subtype, and just the numeric code will show - is there any way to display the coded value instead? 

Thanks!
MichaelTomiak_WSP
New Contributor II

Adding the "domainlookup="true"/" on mine sorted my issues of the DD attributes only showing the coded values. Was driving me nuts, but now sorted to this one bit of script I add manually to each Attribute  tag (not sure why I have to do this manually though).

0 Kudos
ShanaHarmsen
New Contributor II
I am running ArcGIS 10.0...
using Insert-> text-> then editing in properties box - used the format you put down and still just gave me the numeric code.
0 Kudos
RobertBorchert
Frequent Contributor III
Did you do Insert>Text or Insert>Dynamic Text>Data Driven Page Attribute

that is important.

I am running ArcGIS 10.0...
using Insert-> text-> then editing in properties box - used the format you put down and still just gave me the numeric code.
0 Kudos
RobertBorchert
Frequent Contributor III
I cannot remember how 10.0 appears but if there is not an Attribute option for the Dynamic Text simply add a data driven page name and open it's dialog up and change it in there.
0 Kudos
ShanaHarmsen
New Contributor II
10.0 does not have the "Data Driven Pages Attribute" option, but I've tried both
Insert -> text
Insert -> dynamic text -> Data Driven Page Number
then changing in the properties box and still am only getting the numeric code

Since I work off a version I tried it in the default database as well, and still just the numeric code.

Any other suggestions are welcome
Thanks!
0 Kudos
MattSayler
Occasional Contributor II
Might be a setting for displaying coded value vs alias, although I haven't tracked it down yet...
0 Kudos
MattSayler
Occasional Contributor II
That "domainlookup" attribute is the only thing I'm finding too. I think it may be new as of 10.1, as setting it true or false doesn't change anything for me either and I'm not finding it in the 10.0 help docs.

Not sure it's what you're looking for, but you could get around it in a script:
domainDict = {1:"Foo Type",2:"Bar Type",3:"Other Thing"} alias = domainDict[mxd.dataDrivenPages.pageRow.getValue("YourFieldName")] yourElement.text = alias
0 Kudos