{"id":2282,"date":"2019-06-18T10:46:08","date_gmt":"2019-06-18T09:46:08","guid":{"rendered":"https:\/\/help.instantatlas.com\/?p=2282"},"modified":"2019-06-18T10:46:08","modified_gmt":"2019-06-18T09:46:08","slug":"linking-to-reports-from-an-arcgis-web-map","status":"publish","type":"post","link":"https:\/\/help.reports.esriuk.com\/report-builder\/2019\/06\/18\/linking-to-reports-from-an-arcgis-web-map\/","title":{"rendered":"Linking to reports from an ArcGIS web map"},"content":{"rendered":"<p>Reports built with <a href=\"http:\/\/help.instantatlas.com\/report-builder-agol\">InstantAtlas Report Builder<\/a> have a built in index page, whether you choose to use &#8220;live links&#8221; or to publish the reports to HTML. However, this is not the only way to link to reports. Every feature in your report has a unique URL &#8211; this post will walk you through how to use that URL to build links from your <a href=\"http:\/\/doc.arcgis.com\/en\/arcgis-online\/reference\/what-is-web-map.htm\" target=\"_blank\" rel=\"noopener noreferrer\">ArcGIS Online web maps<\/a> directly to your reports.<\/p>\n<p><!--more--><\/p>\n<p>The technical details of linking from a web map to a report using &#8220;live links&#8221; are covered in <a href=\"https:\/\/help.instantatlas.com\/report-builder-agol\/linking-from-a-webmap-to-a-report\/\" target=\"_blank\" rel=\"noopener noreferrer\">&#8220;Linking from a WebMap to a Report&#8221; in the Report Builder help pages<\/a>. This post won&#8217;t repeat that information &#8211; instead it will step through this process using an example map and links to <em>published reports<\/em>, as used in <a href=\"https:\/\/www.instantatlas.com\/websites\" target=\"_blank\" rel=\"noopener noreferrer\">websites<\/a> powered by the <a href=\"https:\/\/www.instantatlas.com\/national-data-services\" target=\"_blank\" rel=\"noopener noreferrer\">InstantAtlas national data services<\/a>.<\/p>\n<p>The web map we are going to use is available at <a href=\"https:\/\/arcg.is\/OCPKv\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/arcg.is\/OCPKv<\/a> and is also embedded below:<\/p>\n<div style=\"max-width: 600px;width: 600px;height: 400px;border: 1px solid #999;border-radius: 2px;margin: 0 auto;padding: 0\"><\/div>\n<p>&nbsp;<\/p>\n<p>Linking from a pop-up to a report relies on the ability to configure <a href=\"https:\/\/doc.arcgis.com\/en\/arcgis-online\/create-maps\/configure-pop-ups.htm\" target=\"_blank\" rel=\"noopener noreferrer\">pop-ups in ArcGIS Online<\/a>. This allows us to change the display from the (fairly boring) list of feature attributes to a rich HTML display with hyperlinks. To do this, we need to open the web map in the map viewer in ArcGIS Online, then click the menu item to configure the popup-up for the layer:<\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-1-configure-pop-up-menu.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-1-configure-pop-up-menu-300x300.png\" alt=\"\" width=\"300\" height=\"300\" class=\"aligncenter wp-image-2283 size-medium\" \/><\/a><\/p>\n<p>This opens a sidebar &#8211; in here you can edit the title of your popup but the interesting bit is the big green CONFIGURE button:<\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-2-configure-pop-up-sidebar.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-2-configure-pop-up-sidebar-197x300.png\" alt=\"\" width=\"197\" height=\"300\" class=\"aligncenter size-medium wp-image-2284\" \/><\/a><\/p>\n<p>This brings up a dialog where you can type the text you want to show in your pop-up. You can bring in data from the <strong>fields<\/strong> of your layer using expressions like <code>{&lt;field-name&gt;}<\/code>, for example <code>{NAME}<\/code>. You can see where we have used this in the example popup-up below to show the name of the feature we have just clicked on:<\/p>\n<p><code>The following reports are available for <strong>{NAME}<\/strong> ...<\/code><\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-3-configure-pop-up-dialog.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-3-configure-pop-up-dialog-300x199.png\" alt=\"\" width=\"300\" height=\"199\" class=\"aligncenter size-medium wp-image-2285\" \/><\/a><\/p>\n<p>The next stage is to build links from the pop-up. Just type the text you want to use as a link, highlight it, then use the Create Link <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-5-configure-pop-up-link-button.png\" alt=\"\" width=\"29\" height=\"25\" class=\"alignnone size-full wp-image-2286\" \/> button. You can then edit the <em>properties<\/em> of that link:<\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-4-configure-pop-up-link-properties.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.instantatlas.com\/wp-content\/uploads\/2019\/06\/map-popup-cumbria-4-configure-pop-up-link-properties-300x181.png\" alt=\"\" width=\"300\" height=\"181\" class=\"aligncenter size-medium wp-image-2287\" \/><\/a><\/p>\n<p>The link <strong>URL<\/strong> is the important part &#8211; URLs used by reports always have the <code>&lt;report-id&gt;<\/code> and the <code>&lt;feature-id&gt;<\/code> in them. The <code>&lt;report-id&gt;<\/code> is the long value shown in the address bar when you view the report in ArcGIS Online, or when you view that report via your data observatory, e.g.<\/p>\n<p><code>https:\/\/www.arcgis.com\/home\/item.html?id=<strong>fc3ec2fc587b48a8ab3600265f184b7f<\/strong><\/code><\/p>\n<p><code>https:\/\/www.cumbriaobservatory.org.uk\/children\/report\/view\/<strong>fc3ec2fc587b48a8ab3600265f184b7f<\/strong>\/E07000026<\/code><\/p>\n<p>The <code>&lt;feature-id&gt;<\/code> comes from the fields of your layer &#8211; in our example each district has a unique ID stored in the <code>LTLACode<\/code> field. It makes up the final part of the URL:<\/p>\n<p><code>https:\/\/www.cumbriaobservatory.org.uk\/children\/report\/view\/fc3ec2fc587b48a8ab3600265f184b7f\/<strong>E07000026<\/strong><\/code><\/p>\n<p>Back to our example &#8211; for each feature the <code>&lt;report-id&gt;<\/code> stays the same, so in our link properties we just need to pass in the <code>&lt;feature-id&gt;<\/code>, using an expression:<\/p>\n<p><code>https:\/\/www.cumbriaobservatory.org.uk\/children\/report\/view\/fc3ec2fc587b48a8ab3600265f184b7f\/<strong>{LTLACode<\/strong>}<\/code><\/p>\n<p>And that&#8217;s it! ArcGIS Online will do the rest of the work for us. Every time somebody clicks on a map feature (a district) the pop-up will be rebuilt with the data for that feature so all the links will take you directly to reports about that feature.<\/p>\n<p>Once you have your web map with links, you can re-use that wherever and however you want &#8211; for example to make a web app that describes the map:<\/p>\n<p><a href=\"https:\/\/www.arcgis.com\/apps\/SimpleViewer\/index.html?appid=e932b94b54ba4f888ba01d224bb0e929\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.arcgis.com\/apps\/SimpleViewer\/index.html?appid=e932b94b54ba4f888ba01d224bb0e929<\/a><\/p>\n<p>Related links:<\/p>\n<p><a href=\"https:\/\/help.instantatlas.com\/report-builder-agol\/linking-from-a-webmap-to-a-report\/\">https:\/\/help.instantatlas.com\/report-builder-agol\/linking-from-a-webmap-to-a-report\/<\/a><\/p>\n<p><a href=\"https:\/\/doc.arcgis.com\/en\/arcgis-online\/create-maps\/configure-pop-ups.htm\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/doc.arcgis.com\/en\/arcgis-online\/create-maps\/configure-pop-ups.htm<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Reports built with InstantAtlas Report Builder have a built in index page, whether you choose to use &#8220;live links&#8221; or to publish the reports to HTML. However, this is not the only way to link to reports. Every feature in your report has a unique URL &#8211; this post will walk you through how to [&hellip;]<\/p>\n","protected":false},"author":61,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,55,61],"tags":[],"class_list":["post-2282","post","type-post","status-publish","format-standard","hentry","category-national-data-services","category-report-builder","category-tips-and-tricks","entry"],"_links":{"self":[{"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/posts\/2282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/users\/61"}],"replies":[{"embeddable":true,"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/comments?post=2282"}],"version-history":[{"count":0,"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/posts\/2282\/revisions"}],"wp:attachment":[{"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/media?parent=2282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/categories?post=2282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.reports.esriuk.com\/report-builder\/wp-json\/wp\/v2\/tags?post=2282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}