<?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: Populate span control on popup in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-span-control-on-popup/m-p/1054869#M72943</link>
    <description>&lt;P&gt;i am trying to pass a field from popup to the span or asp control ... hopefully posted code will help? thanks&lt;/P&gt;&lt;P&gt;&amp;lt;%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="InstreamMap.aspx.cs" Inherits="ModelData_InstreamFlows_InstreamMap" %&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/4.18/esri/themes/light/main.css" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.18/esri/themes/light/main.css&lt;/A&gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;link rel="stylesheet" type="text/css" href="../../Content/MapPages.css" /&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.18/"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;require([&lt;BR /&gt;"esri/config",&lt;BR /&gt;"esri/Map",&lt;BR /&gt;"esri/views/MapView",&lt;BR /&gt;"esri/layers/support/LabelClass",&lt;BR /&gt;"esri/layers/FeatureLayer",&lt;BR /&gt;"esri/widgets/BasemapToggle"&lt;BR /&gt;], function (esriConfig, Map, MapView, infloLabel, FeatureLayer, BasemapToggle ) {&lt;/P&gt;&lt;P&gt;//Set api key&lt;BR /&gt;esriConfig.apiKey = "keyhere";&lt;/P&gt;&lt;P&gt;//Create map&lt;BR /&gt;const map = new Map({&lt;BR /&gt;basemap: "arcgis-topographic" // Basemap layer (eg. arcgis-topographic, hybrid)&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;//Create view&lt;BR /&gt;const view = new MapView({&lt;BR /&gt;map: map,&lt;BR /&gt;center: [-120.478851, 38.575764],&lt;BR /&gt;zoom: 7,&lt;BR /&gt;container: "mapDiv",&lt;BR /&gt;constraints: {&lt;BR /&gt;snapToZoom: false&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;//Create label&lt;BR /&gt;const inflowLabel = { // autocasts as new LabelClass()&lt;BR /&gt;symbol: {&lt;BR /&gt;type: "text", // autocasts as new TextSymbol()&lt;BR /&gt;color: "#00008B",&lt;BR /&gt;font: { // autocast as new Font()&lt;BR /&gt;family: "Segoe UI",&lt;BR /&gt;size: 10,&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;labelPlacement: "above-right",&lt;BR /&gt;labelExpressionInfo: {&lt;BR /&gt;expression: "$feature.PointName"&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;maxScale: 0,&lt;BR /&gt;minScale: 25000000&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;//Create popup template&lt;BR /&gt;const inflowPopup = {&lt;BR /&gt;// autocasts as new PopupTemplate()&lt;BR /&gt;title: "{PointName}",&lt;BR /&gt;content: [&lt;BR /&gt;{&lt;BR /&gt;// It is also possible to set the fieldInfos outside of the content&lt;BR /&gt;// directly in the popupTemplate. If no fieldInfos is specifically set&lt;BR /&gt;// in the content, it defaults to whatever may be set within the popupTemplate.&lt;BR /&gt;type: "fields",&lt;BR /&gt;fieldInfos: [&lt;BR /&gt;{&lt;BR /&gt;fieldName: "PointID",&lt;BR /&gt;label: "ID:"&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;fieldName: "DataSource",&lt;BR /&gt;label: "Data Source:",&lt;BR /&gt;format: {&lt;BR /&gt;digitSeparator: true,&lt;BR /&gt;places: 0&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;fieldName: "DataType",&lt;BR /&gt;label: "Data Type:",&lt;BR /&gt;format: {&lt;BR /&gt;digitSeparator: true,&lt;BR /&gt;places: 0&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;fieldName: "RefDate",&lt;BR /&gt;label: "Reference Date:",&lt;BR /&gt;format: {&lt;BR /&gt;digitSeparator: true,&lt;BR /&gt;places: 0&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;fieldName: "EditedDate",&lt;BR /&gt;label: "Edited Date:",&lt;BR /&gt;format: {&lt;BR /&gt;digitSeparator: true,&lt;BR /&gt;places: 0&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;//Create/add basemap toggle&lt;BR /&gt;//const toggle = new BasemapToggle({&lt;BR /&gt;// view: view, // view that provides access to the map's 'arcgis-topographic' basemap&lt;BR /&gt;// nextBasemap: "hybrid" // allows for toggling to the 'hybrid' basemap&lt;BR /&gt;//});&lt;BR /&gt;//view.ui.add(toggle, "top-right");&lt;/P&gt;&lt;P&gt;const inflowRenderer = {&lt;BR /&gt;type: "simple", // autocasts as new SimpleRenderer()&lt;BR /&gt;symbol: {&lt;BR /&gt;type: "simple-marker", // autocasts as new SimpleMarkerSymbol()&lt;BR /&gt;size: 6,&lt;BR /&gt;color: [230, 149, 0],&lt;BR /&gt;outline: null&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;//Create feature layer&lt;BR /&gt;var featureLayer = new FeatureLayer({&lt;BR /&gt;url:&lt;BR /&gt;"&lt;A href="https://gis.water.ca.gov/arcgis/rest/services/InlandWaters/i12_CalSimII_InflowData/FeatureServer?f=pjson" target="_blank" rel="noopener"&gt;https://gis.water.ca.gov/arcgis/rest/services/InlandWaters/i12_CalSimII_InflowData/FeatureServer?f=pjson&lt;/A&gt;",&lt;BR /&gt;renderer: inflowRenderer,&lt;BR /&gt;popupTemplate: inflowPopup,&lt;BR /&gt;labelingInfo: [inflowLabel]&lt;BR /&gt;})&lt;BR /&gt;map.add(featureLayer);&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;dx:ASPxCallbackPanel ID="ChartCallbackPanel" ClientInstanceName="CallbackPanel"&lt;BR /&gt;OnInit="CallbackPanel_Init"&lt;BR /&gt;runat="server"&amp;gt;&lt;BR /&gt;&amp;lt;SettingsLoadingPanel Enabled="true" /&amp;gt;&lt;BR /&gt;&amp;lt;PanelCollection&amp;gt;&lt;BR /&gt;&amp;lt;dx:PanelContent&amp;gt;&lt;BR /&gt;&amp;lt;dx:ASPxPanel id="panel1" runat="server" &amp;gt;&lt;BR /&gt;&amp;lt;PanelCollection&amp;gt;&lt;BR /&gt;&amp;lt;dx:PanelContent runat="server"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div&amp;gt;&lt;BR /&gt;&amp;lt;div class="left-map-div"&amp;gt;&lt;BR /&gt;&amp;lt;div id="mapDiv" class="map-view"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="right-charts-div"&amp;gt;&lt;/P&gt;&lt;P&gt;/////////// Pass field Point ID from popup to span or asp server control ///////////////&lt;BR /&gt;&amp;lt;span id="pointID"&amp;gt;&amp;lt;/span&amp;gt;&lt;BR /&gt;&amp;lt;asp:Label ID="pointID" runat="server"&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;BR /&gt;////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div style="clear:both"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/dx:PanelContent&amp;gt;&lt;BR /&gt;&amp;lt;/PanelCollection&amp;gt;&lt;BR /&gt;&amp;lt;/dx:ASPxPanel&amp;gt;&lt;BR /&gt;&amp;lt;/dx:PanelContent&amp;gt;&lt;BR /&gt;&amp;lt;/PanelCollection&amp;gt;&lt;BR /&gt;&amp;lt;/dx:ASPxCallbackPanel&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/asp:Content&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 May 2021 19:58:31 GMT</pubDate>
    <dc:creator>dubya</dc:creator>
    <dc:date>2021-05-05T19:58:31Z</dc:date>
    <item>
      <title>Populate span control on popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-span-control-on-popup/m-p/1054843#M72941</link>
      <description>&lt;P&gt;Hi, I have been trying to populate a span control with a field from the popup.&amp;nbsp; This span control is located outside of the popup template and map view ... any pointers on how to do this? Best&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 19:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-span-control-on-popup/m-p/1054843#M72941</guid>
      <dc:creator>dubya</dc:creator>
      <dc:date>2021-05-05T19:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Populate span control on popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-span-control-on-popup/m-p/1054869#M72943</link>
      <description>&lt;P&gt;i am trying to pass a field from popup to the span or asp control ... hopefully posted code will help? thanks&lt;/P&gt;&lt;P&gt;&amp;lt;%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="InstreamMap.aspx.cs" Inherits="ModelData_InstreamFlows_InstreamMap" %&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/4.18/esri/themes/light/main.css" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.18/esri/themes/light/main.css&lt;/A&gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;link rel="stylesheet" type="text/css" href="../../Content/MapPages.css" /&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.18/"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;require([&lt;BR /&gt;"esri/config",&lt;BR /&gt;"esri/Map",&lt;BR /&gt;"esri/views/MapView",&lt;BR /&gt;"esri/layers/support/LabelClass",&lt;BR /&gt;"esri/layers/FeatureLayer",&lt;BR /&gt;"esri/widgets/BasemapToggle"&lt;BR /&gt;], function (esriConfig, Map, MapView, infloLabel, FeatureLayer, BasemapToggle ) {&lt;/P&gt;&lt;P&gt;//Set api key&lt;BR /&gt;esriConfig.apiKey = "keyhere";&lt;/P&gt;&lt;P&gt;//Create map&lt;BR /&gt;const map = new Map({&lt;BR /&gt;basemap: "arcgis-topographic" // Basemap layer (eg. arcgis-topographic, hybrid)&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;//Create view&lt;BR /&gt;const view = new MapView({&lt;BR /&gt;map: map,&lt;BR /&gt;center: [-120.478851, 38.575764],&lt;BR /&gt;zoom: 7,&lt;BR /&gt;container: "mapDiv",&lt;BR /&gt;constraints: {&lt;BR /&gt;snapToZoom: false&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;//Create label&lt;BR /&gt;const inflowLabel = { // autocasts as new LabelClass()&lt;BR /&gt;symbol: {&lt;BR /&gt;type: "text", // autocasts as new TextSymbol()&lt;BR /&gt;color: "#00008B",&lt;BR /&gt;font: { // autocast as new Font()&lt;BR /&gt;family: "Segoe UI",&lt;BR /&gt;size: 10,&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;labelPlacement: "above-right",&lt;BR /&gt;labelExpressionInfo: {&lt;BR /&gt;expression: "$feature.PointName"&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;maxScale: 0,&lt;BR /&gt;minScale: 25000000&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;//Create popup template&lt;BR /&gt;const inflowPopup = {&lt;BR /&gt;// autocasts as new PopupTemplate()&lt;BR /&gt;title: "{PointName}",&lt;BR /&gt;content: [&lt;BR /&gt;{&lt;BR /&gt;// It is also possible to set the fieldInfos outside of the content&lt;BR /&gt;// directly in the popupTemplate. If no fieldInfos is specifically set&lt;BR /&gt;// in the content, it defaults to whatever may be set within the popupTemplate.&lt;BR /&gt;type: "fields",&lt;BR /&gt;fieldInfos: [&lt;BR /&gt;{&lt;BR /&gt;fieldName: "PointID",&lt;BR /&gt;label: "ID:"&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;fieldName: "DataSource",&lt;BR /&gt;label: "Data Source:",&lt;BR /&gt;format: {&lt;BR /&gt;digitSeparator: true,&lt;BR /&gt;places: 0&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;fieldName: "DataType",&lt;BR /&gt;label: "Data Type:",&lt;BR /&gt;format: {&lt;BR /&gt;digitSeparator: true,&lt;BR /&gt;places: 0&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;fieldName: "RefDate",&lt;BR /&gt;label: "Reference Date:",&lt;BR /&gt;format: {&lt;BR /&gt;digitSeparator: true,&lt;BR /&gt;places: 0&lt;BR /&gt;}&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;fieldName: "EditedDate",&lt;BR /&gt;label: "Edited Date:",&lt;BR /&gt;format: {&lt;BR /&gt;digitSeparator: true,&lt;BR /&gt;places: 0&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;//Create/add basemap toggle&lt;BR /&gt;//const toggle = new BasemapToggle({&lt;BR /&gt;// view: view, // view that provides access to the map's 'arcgis-topographic' basemap&lt;BR /&gt;// nextBasemap: "hybrid" // allows for toggling to the 'hybrid' basemap&lt;BR /&gt;//});&lt;BR /&gt;//view.ui.add(toggle, "top-right");&lt;/P&gt;&lt;P&gt;const inflowRenderer = {&lt;BR /&gt;type: "simple", // autocasts as new SimpleRenderer()&lt;BR /&gt;symbol: {&lt;BR /&gt;type: "simple-marker", // autocasts as new SimpleMarkerSymbol()&lt;BR /&gt;size: 6,&lt;BR /&gt;color: [230, 149, 0],&lt;BR /&gt;outline: null&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;//Create feature layer&lt;BR /&gt;var featureLayer = new FeatureLayer({&lt;BR /&gt;url:&lt;BR /&gt;"&lt;A href="https://gis.water.ca.gov/arcgis/rest/services/InlandWaters/i12_CalSimII_InflowData/FeatureServer?f=pjson" target="_blank" rel="noopener"&gt;https://gis.water.ca.gov/arcgis/rest/services/InlandWaters/i12_CalSimII_InflowData/FeatureServer?f=pjson&lt;/A&gt;",&lt;BR /&gt;renderer: inflowRenderer,&lt;BR /&gt;popupTemplate: inflowPopup,&lt;BR /&gt;labelingInfo: [inflowLabel]&lt;BR /&gt;})&lt;BR /&gt;map.add(featureLayer);&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;dx:ASPxCallbackPanel ID="ChartCallbackPanel" ClientInstanceName="CallbackPanel"&lt;BR /&gt;OnInit="CallbackPanel_Init"&lt;BR /&gt;runat="server"&amp;gt;&lt;BR /&gt;&amp;lt;SettingsLoadingPanel Enabled="true" /&amp;gt;&lt;BR /&gt;&amp;lt;PanelCollection&amp;gt;&lt;BR /&gt;&amp;lt;dx:PanelContent&amp;gt;&lt;BR /&gt;&amp;lt;dx:ASPxPanel id="panel1" runat="server" &amp;gt;&lt;BR /&gt;&amp;lt;PanelCollection&amp;gt;&lt;BR /&gt;&amp;lt;dx:PanelContent runat="server"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div&amp;gt;&lt;BR /&gt;&amp;lt;div class="left-map-div"&amp;gt;&lt;BR /&gt;&amp;lt;div id="mapDiv" class="map-view"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="right-charts-div"&amp;gt;&lt;/P&gt;&lt;P&gt;/////////// Pass field Point ID from popup to span or asp server control ///////////////&lt;BR /&gt;&amp;lt;span id="pointID"&amp;gt;&amp;lt;/span&amp;gt;&lt;BR /&gt;&amp;lt;asp:Label ID="pointID" runat="server"&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;BR /&gt;////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div style="clear:both"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/dx:PanelContent&amp;gt;&lt;BR /&gt;&amp;lt;/PanelCollection&amp;gt;&lt;BR /&gt;&amp;lt;/dx:ASPxPanel&amp;gt;&lt;BR /&gt;&amp;lt;/dx:PanelContent&amp;gt;&lt;BR /&gt;&amp;lt;/PanelCollection&amp;gt;&lt;BR /&gt;&amp;lt;/dx:ASPxCallbackPanel&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/asp:Content&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 19:58:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-span-control-on-popup/m-p/1054869#M72943</guid>
      <dc:creator>dubya</dc:creator>
      <dc:date>2021-05-05T19:58:31Z</dc:date>
    </item>
  </channel>
</rss>

