<?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: How do I pass value from config file? in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206280#M5706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, I've been already adding the value to the config. But I wasn't sure how to get hold of it and your line of code worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help, Monika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jan 2016 20:44:26 GMT</pubDate>
    <dc:creator>MonikaHonkova2</dc:creator>
    <dc:date>2016-01-21T20:44:26Z</dc:date>
    <item>
      <title>How do I pass value from config file?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206278#M5704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the Attribute Table widget. In the setting page of the widget I set a value of the map scale I want my map to zoom to if I select a point feature in the attribute table. Reason - I'm only using our own background maps which are dynamic map services. The code in the _FeatureTable.js is designed to work with tiled basemaps. Every "Zoom to" click I make, the map zooms closer and closer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="171663" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/171663_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="171662" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/171662_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could hard code the value in the _FeatureTable.js but I'd rather control it through the widget setting. My question is how to pass the config value from the config file to the _FeatureTable.js?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (method === "zoom") {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.getExtent(result).then(lang.hitch(this, function(gExtent) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (gExtent) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (gExtent.type === "point") {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var currentScale = this.map.getScale();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var factor =&amp;nbsp; MY ZOOM SCALE FROM CONFIG / currentScale;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; levelOrFactor = this.map.getMaxZoom() &amp;gt; -1 ? this.map.getMaxZoom() : 0.1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.map.centerAndZoom(gExtent, factor);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help, Monika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 15:02:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206278#M5704</guid>
      <dc:creator>MonikaHonkova2</dc:creator>
      <dc:date>2016-01-21T15:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass value from config file?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206279#M5705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Monika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Are you already adding this zoom value to the widgets config.json using the getConfig function?&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14533896582996060" data-renderedposition="71_8_912_16" jivemacro_uid="_14533896582996060"&gt;&lt;P&gt;this.config.zoomScale = this.yournumbertextboxcontrol.get('value');&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so then you should be able to do this in the _FeatureTable.js&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_1453389945515614 jive_macro_code jive_text_macro" data-renderedposition="129_8_912_16" jivemacro_uid="_1453389945515614"&gt;&lt;P&gt;var factor = this.parentWidget.config.zoomScale;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 15:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206279#M5705</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-01-21T15:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass value from config file?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206280#M5706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, I've been already adding the value to the config. But I wasn't sure how to get hold of it and your line of code worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help, Monika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 20:44:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206280#M5706</guid>
      <dc:creator>MonikaHonkova2</dc:creator>
      <dc:date>2016-01-21T20:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass value from config file?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206281#M5707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Monika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Glad to help. Make sure to mark this thread as answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 20:49:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-do-i-pass-value-from-config-file/m-p/206281#M5707</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-01-21T20:49:48Z</dc:date>
    </item>
  </channel>
</rss>

