{"id":174751,"date":"2011-03-29T22:34:05","date_gmt":"2011-03-29T22:34:05","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=174751"},"modified":"2018-12-18T11:52:25","modified_gmt":"2018-12-18T19:52:25","slug":"taking-full-advantage-of-dynamic-text","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text","title":{"rendered":"Taking full advantage of dynamic text"},"author":3601,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[22941],"tags":[25311,27981],"industry":[],"product":[36991],"class_list":["post-174751","blog","type-blog","status-publish","format-standard","hentry","category-mapping","tag-arcgis-10","tag-layout","product-arcgis-desktop"],"acf":{"short_description":"At 10 we released dynamic text for the layout. This is layout text that updates automatically based on a property from the map","flexible_content":[{"acf_fc_layout":"content","content":"<p>At 10 we released dynamic text for the layout. This is layout text that updates automatically based on a property from the map, a data frame, or the computer system.\u00a0 Additionally, if you are using data driven pages, dynamic text can be used for page names, page numbers, or attributes from the index layer.\u00a0 Dynamic text uses tags in a standard text element string to specify the properties to return. You can use dynamic text to display things like the current date and time, the current user logged in to the computer, or the map author. The most common dynamic text tags can be added using the\u00a0<b>Insert &gt; Dynamic Text<\/b>\u00a0menu.\u00a0 However, this is only a small number of the types and formats that can be used.<\/p>\n<p>A dynamic text tag always includes a type, for example &lt;dyn type =\u201ddocument\u201d\/&gt; is how you access properties of the map document and &lt;dyn type =\u201dpage\u201d\/&gt; is used to access properties of data driven pages.\u00a0 There are seven types available. In addition to document and page are computer, user, date, time, and data frame. For each type there are additional properties or formatting options. You can specify these using the key words property and format.\u00a0 For example,\u00a0 &lt;dyn type=\u201ddocument\u201d property=\u201dcredits\u201d\/&gt; will return the credits stored in the map document properties, and &lt;dyn type=\u201ddate\u201d format=\u201ddddd MMM yyyy\u201d\/&gt; will return Thursday Sep 2010.<\/p>\n<p>When working with data driven pages you can return the value of any attribute in your page index layer. Simply specify the dynamic type as page and the property as the attribute. For example, &lt;dyn type =\u201dpage\u201d property=\u201dPOP_2000\u201d\/&gt; will return the population value of the POP_2000 attribute for the current page.<\/p>\n<p>There are other things you can do with dynamic text. For example, you can add the corner coordinates of your data frame to your layout.\u00a0 Using the data frame type and the properties for upper left, upper right, lower left and lower right you can access the coordinates of each corner.\u00a0 For example, &lt;dyn type=\u201ddataFrame\u201d name=\u201dDataFrameName\u201d property=\u201dupperLeft.x\u201d units=\u201ddms\u201d decimalPlaces=\u201d2\u2033\/&gt; will return the x coordinate in degrees minutes seconds for the upper left corner of your data frame and &lt;dyn type=\u201ddataFrame\u201d name=\u201dDataFrameName\u201d property=\u201dupperLeft.y\u201d units=\u201ddms\u201d decimalPlaces=\u201d2\u2033\/&gt; will return the y coordinate. If you pan and zoom, the coordinate will update dynamically with the changes to position.<\/p>\n<p><a href=\"http:\/\/downloads2.esri.com\/blogs\/images\/dev_23356.jpg\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/downloads2.esri.com\/blogs\/images\/dev_23356.jpg\" border=\"0\" \/><\/a><\/p>\n<p>There are a few special tags for handling null values or empty strings, and for specifying strings that appear either before or after the dynamic text.\u00a0 These key words are emptyStr, postStr, and preStr. The preStr option allows you to add text before a dynamic text string and the postStr option allows you to add text after a dynamic text string. The emptyStr option lets you specify a string to substitute when the dynamic text returns a null value. For example, when the map author property is not populated, you could use the following: &lt;dyn type=\u201ddocument\u201d property=\u201dauthor\u201d emptyStr=\u201dMap author unknown.\u201d\/&gt; to return a more descriptive explanation rather than just leaving a blank.\u00a0 Or in some cases you may want the entire string to disappear. For example, if you are using dynamic text to label adjoining pages in your map book, when you don\u2019t have an adjoining page you may want the entire \u201cSee page: \u201c text to disappear.\u00a0 &lt;dyn type=\u201dpage\u201d property=\u201dPageNumber_N\u201d preStr=\u201dSee Page: \u201d emptyStr = \u201d \u201c\/&gt; will hide the entire \u201cSee Page: \u201c string when the PageNumber_N attribute is empty.<\/p>\n<p><a href=\"http:\/\/downloads2.esri.com\/blogs\/images\/dev_23357.jpg\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/downloads2.esri.com\/blogs\/images\/dev_23357.jpg\" border=\"0\" \/><\/a>\u00a0<a href=\"http:\/\/downloads2.esri.com\/blogs\/images\/dev_23358.jpg\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/downloads2.esri.com\/blogs\/images\/dev_23358.jpg\" border=\"0\" \/><\/a><\/p>\n<p>There are many types and formats for dynamic text that are available in addition to those under the\u00a0<b>Insert &gt; Dynamic Text\u00a0<\/b>menu.\u00a0 These are all accessible through tags that can be added to any layout text element.\u00a0 For a more complete list, and to start taking full advantage of all the dynamic text options, take a look through the tables and examples in the help doc\u00a0<i><a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/Working_with_dynamic_text\/00s900000013000000\/\" target=\"_blank\" rel=\"noopener\">Working with dynamic text<\/a><\/i>\u00a0located\u00a0<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/Working_with_dynamic_text\/00s900000013000000\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p>Content from David Watkins<\/p>\n"}],"authors":[{"ID":3601,"user_firstname":"Rob","user_lastname":"Elkins","nickname":"rpe2","user_nicename":"rpe2","display_name":"Rob Elkins","user_email":"relkins@esri.com","user_url":"","user_registered":"2018-03-02 00:15:15","user_description":"","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/372025ad723ca3ed9f19047a9f7e1db155d632dbd4c919d556c8daa4654f15fa?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/372025ad723ca3ed9f19047a9f7e1db155d632dbd4c919d556c8daa4654f15fa?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}],"related_articles":"","card_image":false,"wide_image":false},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Taking full advantage of dynamic text<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Taking full advantage of dynamic text\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-18T19:52:25+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text\"},\"author\":{\"name\":\"Rob Elkins\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/3334a2f9ab0a4c95d2e01e7e7f44c5d5\"},\"headline\":\"Taking full advantage of dynamic text\",\"datePublished\":\"2011-03-29T22:34:05+00:00\",\"dateModified\":\"2018-12-18T19:52:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text\"},\"wordCount\":6,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"ArcGIS 10\",\"Layout\"],\"articleSection\":[\"Mapping\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text\",\"name\":\"Taking full advantage of dynamic text\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2011-03-29T22:34:05+00:00\",\"dateModified\":\"2018-12-18T19:52:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Taking full advantage of dynamic text\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/3334a2f9ab0a4c95d2e01e7e7f44c5d5\",\"name\":\"Rob Elkins\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/372025ad723ca3ed9f19047a9f7e1db155d632dbd4c919d556c8daa4654f15fa?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/372025ad723ca3ed9f19047a9f7e1db155d632dbd4c919d556c8daa4654f15fa?s=96&d=blank&r=g\",\"caption\":\"Rob Elkins\"},\"url\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Taking full advantage of dynamic text","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text","og_locale":"en_US","og_type":"article","og_title":"Taking full advantage of dynamic text","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-12-18T19:52:25+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text"},"author":{"name":"Rob Elkins","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/3334a2f9ab0a4c95d2e01e7e7f44c5d5"},"headline":"Taking full advantage of dynamic text","datePublished":"2011-03-29T22:34:05+00:00","dateModified":"2018-12-18T19:52:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text"},"wordCount":6,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["ArcGIS 10","Layout"],"articleSection":["Mapping"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text","name":"Taking full advantage of dynamic text","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2011-03-29T22:34:05+00:00","dateModified":"2018-12-18T19:52:25+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/mapping\/taking-full-advantage-of-dynamic-text#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Taking full advantage of dynamic text"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/3334a2f9ab0a4c95d2e01e7e7f44c5d5","name":"Rob Elkins","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/372025ad723ca3ed9f19047a9f7e1db155d632dbd4c919d556c8daa4654f15fa?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/372025ad723ca3ed9f19047a9f7e1db155d632dbd4c919d556c8daa4654f15fa?s=96&d=blank&r=g","caption":"Rob Elkins"},"url":""}]}},"text_date":"March 29, 2011","author_name":"Rob Elkins","author_page":false,"custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","primary_product":"ArcMap","tag_data":[{"term_id":25311,"name":"ArcGIS 10","slug":"arcgis-10","term_group":0,"term_taxonomy_id":25311,"taxonomy":"post_tag","description":"","parent":0,"count":48,"filter":"raw"},{"term_id":27981,"name":"Layout","slug":"layout","term_group":0,"term_taxonomy_id":27981,"taxonomy":"post_tag","description":"","parent":0,"count":36,"filter":"raw"}],"category_data":[{"term_id":22941,"name":"Mapping","slug":"mapping","term_group":0,"term_taxonomy_id":22941,"taxonomy":"category","description":"","parent":0,"count":2693,"filter":"raw"}],"product_data":[{"term_id":36991,"name":"ArcMap","slug":"arcgis-desktop","term_group":0,"term_taxonomy_id":36991,"taxonomy":"product","description":"","parent":36981,"count":325,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=arcgis-desktop","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/174751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/3601"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=174751"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/174751\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=174751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=174751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=174751"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=174751"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=174751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}