<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Populating a Popup from a dojoGrid feature in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713426#M66290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://jsbin.com/fokaqifexi/edit?js,output" title="https://jsbin.com/fokaqifexi/edit?js,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 May 2017 20:30:57 GMT</pubDate>
    <dc:creator>JayHill</dc:creator>
    <dc:date>2017-05-22T20:30:57Z</dc:date>
    <item>
      <title>Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713419#M66283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have populated a dojoGrid with the search results from a feature class and now when it zooms to a selected feature in the grid it zooms and opens a blank popup but cannot figure out how to populate it. This is with the 4.3 API&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;grid.on("RowClick", function(evt){&lt;BR /&gt; console.log(results);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var idx = evt.rowIndex;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;//console.log(idx);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;rowData = grid.getItem(idx);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;//console.log(rowData);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;document.getElementById("results").innerHTML =&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;"You have clicked on " + rowData.SampleID + ".";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;//console.log(rowData.OBJECTID);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var cnt = results[idx].extent.center;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(cnt);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;app.view.goTo({&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;center: cnt, // position:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;zoom: 13&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(results[idx].feature);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;app.view.popup.open({&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;features: results[idx].feature,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;//updateLocationEnabled: true,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;content: results[idx].feature.attributes,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;location: cnt&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;}, true);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 16:54:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713419#M66283</guid>
      <dc:creator>JayHill</dc:creator>
      <dc:date>2017-05-18T16:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713420#M66284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you create the feature layer in the map you can define a popup template that determines how the popup will be populated when it is displayed for the selected feature. Here's a link to a sample from the help that shows how to define a popup template.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=get-started-popupTemplate" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=get-started-popupTemplate"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 18:14:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713420#M66284</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2017-05-19T18:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713421#M66285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have defined the popup but we are passing search results from the search widget as an array to a dataGrid. When the user clicks on a row item then the map zooms to that feature by pulling geometry and cannot figure how to fire the popup correctly with this method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 15:26:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713421#M66285</guid>
      <dc:creator>JayHill</dc:creator>
      <dc:date>2017-05-22T15:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713422#M66286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The features property in the parameter for popup.open method, is an array of Graphics, not a single feature. Also content will not take attributes, below is the documentation of Popup.content.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The content of the popup. When set directly on the Popup, this content is static and cannot use fields to set content templates. To set a template for the content based on field or attribute names, see &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content"&gt;PopupTemplate.content&lt;/A&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Do you get any errors in the console?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if setting popup.visible = true helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 15:42:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713422#M66286</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2017-05-22T15:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713423#M66287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you already have the popup template defined then you should be able to display the popup using popup.open and passing in an array with your selected feature. Here's a snippet from a help sample that shows this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; if (result) {&lt;BR /&gt; // open the popup at the centroid of zip code polygon&lt;BR /&gt; // and set the popup's features which will populate popup content and title.&lt;BR /&gt; view.popup.open({&lt;BR /&gt; features: [result],&lt;BR /&gt; location: result.geometry.centroid&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is the full sample.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=featurelayerview-query" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=featurelayerview-query"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this approach isn't working for you do you have a working version of your code that you can share?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 18:30:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713423#M66287</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2017-05-22T18:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713424#M66288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Popup still not working. Below is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;require([&lt;/P&gt;&lt;P&gt;"dojo/query",&lt;BR /&gt; "esri/layers/MapImageLayer",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/PopupTemplate",&lt;BR /&gt; "esri/widgets/LayerList",&lt;BR /&gt; "esri/widgets/Legend",&lt;BR /&gt; "esri/widgets/Popup",&lt;BR /&gt; "esri/widgets/Search",&lt;BR /&gt; "esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt; "esri/renderers/SimpleRenderer",&lt;BR /&gt; "esri/tasks/QueryTask",&lt;BR /&gt; "esri/tasks/support/Query",&lt;BR /&gt; "esri/layers/GraphicsLayer",&lt;BR /&gt; "dojo/request",&lt;BR /&gt; "dojo/store/Memory",&lt;BR /&gt; "dojo/data/ObjectStore",&lt;BR /&gt; "dojo/data/ItemFileReadStore",&lt;BR /&gt; "dojox/grid/DataGrid",&lt;BR /&gt; "dojox/math/round",&lt;BR /&gt; "dojo/domReady!"&lt;/P&gt;&lt;P&gt;], function(query, MapImageLayer, FeatureLayer, PopupTemplate, LayerList, Legend, Popup, Search, SimpleMarkerSymbol, SimpleRenderer, QueryTask, Query, GraphicsLayer, request, Memory, ObjectStore, ItemFileReadStore, DataGrid, mathRound, dom) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // create popup template content for use clicks&lt;BR /&gt; function createClickContentCarbon(featureSet){&lt;BR /&gt; var content = "";&lt;BR /&gt; var att = featureSet.graphic.attributes;&lt;/P&gt;&lt;P&gt;if(att.SampleID){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Sample ID'&amp;gt;Sample ID: &amp;lt;/span&amp;gt;" + "&amp;lt;span id='faultTip'&amp;gt;" + att.SampleID + "&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.SampleMaterial){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Sample Material'&amp;gt;Sample Material: &amp;lt;/span&amp;gt;" + att.SampleMaterial + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.Project){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Project Name'&amp;gt;Project Name: &amp;lt;/span&amp;gt;" + att.Project + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.DatingType){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Dating Type'&amp;gt;Dating Type: &amp;lt;/span&amp;gt;" + att.DatingType + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.ConventionalAge){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Conventional Age'&amp;gt;Age: &amp;lt;/span&amp;gt;" + att.ConventionalAge + " ± " + att.Conventional1Sigma + "&amp;lt;br /&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.CalibratedAge1A != null &amp;amp;&amp;amp; att.CalibratedAge1B != null &amp;amp;&amp;amp; att.CalibratedAge1Unit != null &amp;amp;&amp;amp; att.CalibratedAge1Sigma != null){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Calibrated Age'&amp;gt;Calibrated Age: &amp;lt;/span&amp;gt;" + att.CalibratedAge1A + " - " + att.CalibratedAge1B + att.CalibratedAge1Unit + ", " + att.CalibratedAge1Sigma + "&amp;lt;br /&amp;gt;";&lt;BR /&gt; } else if (att.CalibratedAge1A == null &amp;amp;&amp;amp; att.CalibratedAge1B != null &amp;amp;&amp;amp; att.CalibratedAge1Unit != null &amp;amp;&amp;amp; att.CalibratedAge1Sigma != null){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Calibrated Age'&amp;gt;Calibrated Age: &amp;lt;/span&amp;gt;" + "" + " - " + att.CalibratedAge1B + att.CalibratedAge1Unit + ", " + att.CalibratedAge1Sigma + "&amp;lt;br /&amp;gt;"&lt;BR /&gt; } else if (att.CalibratedAge1A != null &amp;amp;&amp;amp; att.CalibratedAge1B == null &amp;amp;&amp;amp; att.CalibratedAge1Unit != null &amp;amp;&amp;amp; att.CalibratedAge1Sigma != null){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Calibrated Age'&amp;gt;Calibrated Age: &amp;lt;/span&amp;gt;" + att.CalibratedAge1A + " - " + "" + att.CalibratedAge1Unit + ", " + att.CalibratedAge1Sigma + "&amp;lt;br /&amp;gt;"&lt;BR /&gt; } else if (att.CalibratedAge1A != null &amp;amp;&amp;amp; att.CalibratedAge1B != null &amp;amp;&amp;amp; att.CalibratedAge1Unit == null &amp;amp;&amp;amp; att.CalibratedAge1Sigma != null){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Calibrated Age'&amp;gt;Calibrated Age: &amp;lt;/span&amp;gt;" + att.CalibratedAge1A + " - " + att.CalibratedAge1B + "" + ", " + att.CalibratedAge1Sigma + "&amp;lt;br /&amp;gt;"&lt;BR /&gt; } else if (att.CalibratedAge1A != null &amp;amp;&amp;amp; att.CalibratedAge1B != null &amp;amp;&amp;amp; att.CalibratedAge1Unit != null &amp;amp;&amp;amp; att.CalibratedAge1Sigma == null){&lt;BR /&gt; content += "&amp;lt;span class='bold' title='Calibrated Age'&amp;gt;Calibrated Age: &amp;lt;/span&amp;gt;" + att.CalibratedAge1A + " - " + att.CalibratedAge1B + att.CalibratedAge1Unit + ", " + "" + "&amp;lt;br /&amp;gt;"&lt;BR /&gt; }&lt;BR /&gt; if(att.LabReportsRS){&lt;BR /&gt;&lt;SPAN&gt; content += "&amp;lt;span class='bold' title='Show complete report for " + att.SampleID + "'&amp;gt;Detailed Report: &amp;lt;/span&amp;gt;" + "&amp;lt;a href=" + "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgeodata.geology.utah.gov%2Fpages%2Fview.php%3Fref%3D" rel="nofollow" target="_blank"&gt;https://geodata.geology.utah.gov/pages/view.php?ref=&lt;/A&gt;&lt;SPAN&gt;" + att.LabReportsRS + " target='_blank'&amp;gt;Opens in new tab";&lt;/SPAN&gt;&lt;BR /&gt; } else if (att.LabReportsRS == null){&lt;BR /&gt; content += "&amp;lt;span class='bold'&amp;gt;Detailed Report: &amp;lt;/span&amp;gt;Detailed report not currently available";&lt;BR /&gt; }&lt;BR /&gt; return content;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // create popup template content for use clicks&lt;BR /&gt; function createClickContentLum(featureSetLum){&lt;BR /&gt; var contentLum = "";&lt;BR /&gt; var att = featureSetLum.graphic.attributes;&lt;/P&gt;&lt;P&gt;if(att.SampleID){&lt;BR /&gt; contentLum += "&amp;lt;span class='bold' title='Sample ID'&amp;gt;Sample ID: &amp;lt;/span&amp;gt;" + "&amp;lt;span id='faultTip'&amp;gt;" + att.SampleID + "&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.SampleMaterial){&lt;BR /&gt; contentLum += "&amp;lt;span class='bold' title='Sample Material'&amp;gt;Sample Material: &amp;lt;/span&amp;gt;" + att.SampleMaterial + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.Project){&lt;BR /&gt; contentLum += "&amp;lt;span class='bold' title='Project Name'&amp;gt;Project Name: &amp;lt;/span&amp;gt;" + att.Project + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.DatingType){&lt;BR /&gt; contentLum += "&amp;lt;span class='bold' title='Dating Type'&amp;gt;Dating Type: &amp;lt;/span&amp;gt;" + att.DatingType + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.ConventionalAge){&lt;BR /&gt; contentLum += "&amp;lt;span class='bold' title='Conventional Age'&amp;gt;Age: &amp;lt;/span&amp;gt;" + att.ConventionalAge + " ± " + att.Conventional1Sigma + "&amp;lt;br /&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.LabReportsRS){&lt;BR /&gt;&lt;SPAN&gt; contentLum += "&amp;lt;span class='bold' title='Show complete report for " + att.SampleID + "'&amp;gt;Detailed Report: &amp;lt;/span&amp;gt;" + "&amp;lt;a href=" + "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgeodata.geology.utah.gov%2Fpages%2Fview.php%3Fref%3D" rel="nofollow" target="_blank"&gt;https://geodata.geology.utah.gov/pages/view.php?ref=&lt;/A&gt;&lt;SPAN&gt;" + att.LabReportsRS + " target='_blank'&amp;gt;Opens in new tab";&lt;/SPAN&gt;&lt;BR /&gt; } else if (att.LabReportsRS == null){&lt;BR /&gt; contentLum += "&amp;lt;span class='bold'&amp;gt;Detailed Report: &amp;lt;/span&amp;gt;Detailed report not currently available";&lt;BR /&gt; }&lt;BR /&gt; return contentLum;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;function createClickContentArgon(featureSetAr){&lt;BR /&gt; var contentAr = "";&lt;BR /&gt; var att = featureSetAr.graphic.attributes;&lt;/P&gt;&lt;P&gt;if(att.SampleID){&lt;BR /&gt; contentAr += "&amp;lt;span class='bold' title='Sample ID'&amp;gt;Sample ID: &amp;lt;/span&amp;gt;" + "&amp;lt;span id='faultTip'&amp;gt;" + att.SampleID + "&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.SampleMaterial){&lt;BR /&gt; contentAr += "&amp;lt;span class='bold' title='Sample Material'&amp;gt;Sample Material: &amp;lt;/span&amp;gt;" + att.SampleMaterial + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.Project){&lt;BR /&gt; contentAr += "&amp;lt;span class='bold' title='Project Name'&amp;gt;Project Name: &amp;lt;/span&amp;gt;" + att.Project + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.DatingType){&lt;BR /&gt; contentAr += "&amp;lt;span class='bold' title='Dating Type'&amp;gt;Dating Type: &amp;lt;/span&amp;gt;" + att.DatingType + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.Age){&lt;BR /&gt; contentAr += "&amp;lt;span class='bold' title='Conventional Age'&amp;gt;Age: &amp;lt;/span&amp;gt;" + att.Age + " ± " + att.AgeRange + "&amp;lt;br /&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.LabReportRS){&lt;BR /&gt;&lt;SPAN&gt; contentAr += "&amp;lt;span class='bold'&amp;gt;Detailed Report: &amp;lt;/span&amp;gt;" + "&amp;lt;a href=" + "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgeodata.geology.utah.gov%2Fpages%2Fview.php%3Fref%3D" rel="nofollow" target="_blank"&gt;https://geodata.geology.utah.gov/pages/view.php?ref=&lt;/A&gt;&lt;SPAN&gt;" + att.LabReportRS + " target='_blank'&amp;gt;Opens in new tab";&lt;/SPAN&gt;&lt;BR /&gt; } else if (att.LabReportRS == null){&lt;BR /&gt; contentAr += "&amp;lt;span class='bold'&amp;gt;Detailed Report: &amp;lt;/span&amp;gt;Detailed report not currently available";&lt;BR /&gt; }&lt;BR /&gt; return contentAr;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;function createClickContentPro(featureSetPro){&lt;BR /&gt; var contentPro = "";&lt;BR /&gt; var att = featureSetPro.graphic.attributes;&lt;/P&gt;&lt;P&gt;if(att.ProjectID){&lt;BR /&gt; contentPro += "&amp;lt;span class='bold' title='Sample ID'&amp;gt;Project ID: &amp;lt;/span&amp;gt;" + "&amp;lt;span id='faultTip'&amp;gt;" + att.ProjectID + "&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.ProjectName){&lt;BR /&gt; contentPro += "&amp;lt;span class='bold' title='Project Name'&amp;gt;Project Name: &amp;lt;/span&amp;gt;" + att.ProjectName + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.ProjectType){&lt;BR /&gt; contentPro += "&amp;lt;span class='bold' title='Project Type'&amp;gt;Project Type: &amp;lt;/span&amp;gt;" + att.ProjectType + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; if(att.OrgName){&lt;BR /&gt; contentPro += "&amp;lt;span class='bold' title='Organization Name'&amp;gt;Organization Name: &amp;lt;/span&amp;gt;" + att.OrgName + "&amp;lt;br/&amp;gt;";&lt;BR /&gt; }&lt;BR /&gt; return contentPro;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var layer = new MapImageLayer({&lt;BR /&gt;&lt;SPAN&gt; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmaps.geology.utah.gov%2Farcgis%2Frest%2Fservices%2FHazards%2FGeochronology%2FMapServer" rel="nofollow" target="_blank"&gt;https://maps.geology.utah.gov/arcgis/rest/services/Hazards/Geochronology/MapServer&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; title: "Geochronology Samples",&lt;BR /&gt; sublayers: [&lt;BR /&gt; {&lt;BR /&gt; id: 0,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Radiocarbon",&lt;BR /&gt; popupTemplate: {&lt;BR /&gt; title: "Radiocarbon",&lt;BR /&gt; content: createClickContentCarbon&lt;BR /&gt; },&lt;BR /&gt; },&lt;BR /&gt; {&lt;BR /&gt; id: 1,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Argon",&lt;BR /&gt; popupTemplate: {&lt;BR /&gt; title: "Argon",&lt;BR /&gt; content: createClickContentArgon },&lt;BR /&gt; },&lt;BR /&gt; {&lt;BR /&gt; id: 2,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Luminescence",&lt;BR /&gt; popupTemplate: {&lt;BR /&gt; title: "Luminescence",&lt;BR /&gt; content: createClickContentLum },&lt;BR /&gt; },&lt;BR /&gt; {&lt;BR /&gt; id: 3,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Project",&lt;BR /&gt; popupTemplate: {&lt;BR /&gt; title: "Project Area",&lt;BR /&gt; content: createClickContentPro },&lt;BR /&gt; }&lt;BR /&gt; ]&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;app.view.map.add(layer);&lt;/P&gt;&lt;P&gt;var lgdiv = query("#collapseLegend &amp;gt; .panel-body"); //returns an array with 1 item.&lt;BR /&gt;app.legend = new Legend({&lt;BR /&gt; view: app.view,&lt;BR /&gt;}, lgdiv[0]);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var lyrdiv = query("#collapseLayers &amp;gt; .panel-body"); //returns an array with 1 item.&lt;BR /&gt;app.layerList = new LayerList({&lt;BR /&gt; view: app.view,&lt;BR /&gt;}, lyrdiv[0]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var grid = new DataGrid({&lt;BR /&gt; class: "grid",&lt;BR /&gt; //store: test_store,&lt;BR /&gt; //query: { id: "*" },&lt;BR /&gt; structure: [&lt;BR /&gt; { name: "Sample ID", field: "SampleID", width: "15%" },&lt;BR /&gt; { name: "Project", field: "Project", width: "15%" },&lt;BR /&gt; { name: "Material", field: "SampleMaterial", width: "15%" },&lt;BR /&gt; { name: "objectid", field: "OBJECTID", width: "50%", hidden:true },&lt;BR /&gt; { name: "Dating Type", field: "DatingType", width: "50%" }&lt;/P&gt;&lt;P&gt;]&lt;BR /&gt;}, "grid");&lt;BR /&gt;grid.startup();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/// START SEARCH code&lt;BR /&gt;//app.searchWidgetNav.search(app.searchWidgetNav.selectedResult.name);&lt;BR /&gt;app.searchWidgetNav.allPlaceholder = "Find Project or Sampled By";&lt;BR /&gt;app.searchWidgetNav.activeSourceIndex = "1"; // to make faults default source, change to 0 ?&lt;/P&gt;&lt;P&gt;app.searchWidgetNav.on("search-complete", function(e){&lt;BR /&gt; //console.log(e);&lt;BR /&gt; app.view.popup.clear(); // close popup if its open from last search&lt;BR /&gt; var results = null; // clear old searches&lt;BR /&gt; var results = e["results"][0].results;&lt;BR /&gt; console.log(results);&lt;/P&gt;&lt;P&gt;var srch = {"items": [ ]};&lt;BR /&gt; console.log(srch);&lt;BR /&gt; results.forEach(function (ftrs, n) {&lt;BR /&gt; //srch = dojo.map(results, function(ftrs, n){&lt;BR /&gt; //console.log(ftrs.feature.attributes);&lt;BR /&gt; var att = ftrs.feature.attributes;&lt;BR /&gt; // we need to somehow add the geometry or at least center point to the attributes, and hide it in the table&lt;BR /&gt; // then when user clicks on table, we'll get that att and zoom to the feature&lt;BR /&gt; // att.geometry.push("stuff");&lt;BR /&gt; console.log(att);&lt;BR /&gt; srch.items.push( att );&lt;BR /&gt;// return ftrs.feature.attributes;&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; if (srch){&lt;/P&gt;&lt;P&gt;console.log("lets see if it works now!");&lt;BR /&gt; console.log(srch);&lt;/P&gt;&lt;P&gt;var newgrid = dijit.byId("grid");&lt;BR /&gt; //console.log(newgrid);&lt;/P&gt;&lt;P&gt;// var newstore = new Memory({ data: items }); //, idProperty: "id"&lt;BR /&gt;// var test_store = new ObjectStore({objectStore: store});&lt;BR /&gt; var test_store = new ItemFileReadStore({data: srch});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; grid.setStore(test_store);&lt;/P&gt;&lt;P&gt;grid.on("RowClick", function(evt){&lt;BR /&gt; console.log(results);&lt;BR /&gt; var idx = evt.rowIndex;&lt;BR /&gt; //console.log(idx);&lt;BR /&gt; rowData = grid.getItem(idx);&lt;BR /&gt; //console.log(rowData);&lt;BR /&gt; document.getElementById("results").innerHTML =&lt;BR /&gt; "You have clicked on " + rowData.SampleID + ".";&lt;BR /&gt; //console.log(rowData.OBJECTID);&lt;/P&gt;&lt;P&gt;var cnt = results[idx].extent.center;&lt;BR /&gt; console.log(cnt);&lt;/P&gt;&lt;P&gt;app.view.goTo({&lt;BR /&gt; center: cnt, // position:&lt;BR /&gt; zoom: 13&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;console.log(results[idx]);&lt;BR /&gt; // do we have to .clone() the feature? Or getEffectivePopupTemplate()&lt;BR /&gt; //app.view.popup.visible = true;&lt;BR /&gt; app.view.popup.open({&lt;BR /&gt; //features: [results[idx]],&lt;BR /&gt; //updateLocationEnabled: true,&lt;BR /&gt; //title: "I am a feature",&lt;BR /&gt; //content: results[idx],&lt;BR /&gt; location: cnt&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;}, true);&lt;/P&gt;&lt;P&gt;} // end if&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;app.searchWidgetNav.on("search-start", function(e) {&lt;BR /&gt; app.view.popup.close(); //close previous popup when starting new search&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;app.searchWidgetNav.on("search-clear", function(e) {&lt;BR /&gt; //console.log(e);&lt;BR /&gt; // I only want to hide fault search panel here NOT, other calicite panels like layer legend&lt;BR /&gt; query("#panelMessage").collapse("hide"); // so I use these instead&lt;BR /&gt; query("#collapseMessage").collapse("hide");&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var sources = [&lt;BR /&gt; {&lt;BR /&gt; featureLayer: new FeatureLayer({&lt;BR /&gt;&lt;SPAN&gt; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmaps.geology.utah.gov%2Farcgis%2Frest%2Fservices%2FHazards%2FGeochronology%2FMapServer%2F0" rel="nofollow" target="_blank"&gt;https://maps.geology.utah.gov/arcgis/rest/services/Hazards/Geochronology/MapServer/0&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; outFields: ["Project", "SampleID", "SampleMaterial", "DatingType","ConventionalAge", "CalibratedAge1A", "Conventional1Sigma", "CalibratedAge1B", "CalibratedAge1Unit", "LabReportsRS"],&lt;BR /&gt; popupTemplate: {&lt;BR /&gt; title: "Radiocarbon",&lt;BR /&gt; content: createClickContentCarbon&lt;BR /&gt; // visible: true&lt;BR /&gt; }&lt;BR /&gt; }),&lt;BR /&gt; popupEnabled: true,&lt;BR /&gt; displayField: "Project", // see FeatureLayerSource API Reference&lt;BR /&gt; searchFields: ["Project","SampledBy"], // see FeatureLayerSource API Reference&lt;BR /&gt; name: "Carbon Search",&lt;BR /&gt; maxResults: 100,&lt;BR /&gt; maxSuggestions: 16,&lt;BR /&gt; minSuggestCharacters: 2,&lt;BR /&gt; //enableInfoWindow: true,&lt;BR /&gt; //exactMatch: false, // default is false, unneeded&lt;BR /&gt; popupOpenOnSelect: true,&lt;BR /&gt; resultSymbol: new SimpleMarkerSymbol({&lt;BR /&gt; size: 10,&lt;BR /&gt; color: [255, 255, 0], //[255, 255, 0, .9]&lt;BR /&gt; width: 3&lt;BR /&gt; }),&lt;BR /&gt; //zoomScale: 100000, // use this or searchExtent&lt;BR /&gt; //searchExtent: extent, // use this or zoomScale&lt;BR /&gt; },&lt;BR /&gt;{&lt;BR /&gt; featureLayer: new FeatureLayer({&lt;BR /&gt;&lt;SPAN&gt; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmaps.geology.utah.gov%2Farcgis%2Frest%2Fservices%2FHazards%2FGeochronology%2FMapServer%2F1" rel="nofollow" target="_blank"&gt;https://maps.geology.utah.gov/arcgis/rest/services/Hazards/Geochronology/MapServer/1&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; outFields: ["Project", "SampleID", "SampleMaterial", "DatingType","Age", "AgeRange", "LabReportRS"],&lt;BR /&gt; popupTemplate: {&lt;BR /&gt; title: "Argon",&lt;BR /&gt; content: createClickContentArgon&lt;BR /&gt; // visible: true&lt;BR /&gt; }&lt;BR /&gt; }),&lt;BR /&gt; popupEnabled: true,&lt;BR /&gt; displayField: "Project", // see FeatureLayerSource API Reference&lt;BR /&gt; searchFields: ["Project","SampleBy"], // see FeatureLayerSource API Reference&lt;BR /&gt; name: "Argon Search",&lt;BR /&gt; maxResults: "100",&lt;BR /&gt; maxSuggestions: 16,&lt;BR /&gt; minSuggestCharacters: 2,&lt;BR /&gt; //enableInfoWindow: true,&lt;BR /&gt; //exactMatch: false, // default is false, unneeded&lt;BR /&gt; popupOpenOnSelect: true,&lt;BR /&gt; resultSymbol: new SimpleMarkerSymbol({&lt;BR /&gt; size: 10,&lt;BR /&gt; color: [255, 255, 0], //[255, 255, 0, .9]&lt;BR /&gt; width: 3&lt;BR /&gt; }),&lt;BR /&gt; //zoomScale: 100000, // use this or searchExtent&lt;BR /&gt; //searchExtent: extent, // use this or zoomScale&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt; featureLayer: new FeatureLayer({&lt;BR /&gt;&lt;SPAN&gt; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmaps.geology.utah.gov%2Farcgis%2Frest%2Fservices%2FHazards%2FGeochronology%2FMapServer%2F2" rel="nofollow" target="_blank"&gt;https://maps.geology.utah.gov/arcgis/rest/services/Hazards/Geochronology/MapServer/2&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; outFields: ["Project", "SampleID", "SampleMaterial", "DatingType","Age", "AgeRange", "LabReportRS"],&lt;BR /&gt; popupTemplate: {&lt;BR /&gt; title: "Luminescence",&lt;BR /&gt; content: createClickContentLum&lt;BR /&gt; // visible: true&lt;BR /&gt; }&lt;BR /&gt; }),&lt;BR /&gt; popupEnabled: true,&lt;BR /&gt; displayField: "Project", // see FeatureLayerSource API Reference&lt;BR /&gt; searchFields: ["Project","SampleBy"], // see FeatureLayerSource API Reference&lt;BR /&gt; name: "Luminescence Search",&lt;BR /&gt; maxResults: "100",&lt;BR /&gt; maxSuggestions: 16,&lt;BR /&gt; minSuggestCharacters: 2,&lt;BR /&gt; //enableInfoWindow: true,&lt;BR /&gt; //exactMatch: false, // default is false, unneeded&lt;BR /&gt; popupOpenOnSelect: true,&lt;BR /&gt; resultSymbol: new SimpleMarkerSymbol({&lt;BR /&gt; size: 10,&lt;BR /&gt; color: [255, 255, 0], //[255, 255, 0, .9]&lt;BR /&gt; width: 3&lt;BR /&gt; }),&lt;BR /&gt; //zoomScale: 100000, // use this or searchExtent&lt;BR /&gt; //searchExtent: extent, // use this or zoomScale&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;app.searchWidgetNav.sources = sources; // or for new source searchWidget.sources.push({ ... });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 19:07:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713424#M66288</guid>
      <dc:creator>JayHill</dc:creator>
      <dc:date>2017-05-22T19:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713425#M66289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you've commented out setting the feature?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff; font-size: 14px;"&gt;app.view.popup.open({&lt;/SPAN&gt;&lt;BR style="color: #666666; font-size: 14px;" /&gt;&lt;SPAN style="color: #666666; background-color: #ffffff; font-size: 14px;"&gt;//features: [results[idx]],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff; font-size: 14px;"&gt;Also if you could put the code into something like JSBin so you have a working sample it would make it easier to test and troubleshoot.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 19:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713425#M66289</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2017-05-22T19:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713426#M66290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://jsbin.com/fokaqifexi/edit?js,output" title="https://jsbin.com/fokaqifexi/edit?js,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 20:30:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713426#M66290</guid>
      <dc:creator>JayHill</dc:creator>
      <dc:date>2017-05-22T20:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713427#M66291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ya sorry I was trying some different options, forgot to un comment it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 20:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713427#M66291</guid>
      <dc:creator>JayHill</dc:creator>
      <dc:date>2017-05-22T20:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Populating a Popup from a dojoGrid feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713428#M66292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The JSBin doesn't seem to be working? Looks like there is some crucial code missing or the code needs to be simplified to remove the unnecessary bits of code.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 21:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populating-a-popup-from-a-dojogrid-feature/m-p/713428#M66292</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2017-05-22T21:16:03Z</dc:date>
    </item>
  </channel>
</rss>

