<?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 javascript in ArcGIS Online in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/javascript-in-arcgis-online/m-p/181156#M8888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm attempting to use javascript in ArcGIS Online's popup in the mapviewer and am having some issues with getting a function to stick with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added a LiveFeed layer, &lt;EM&gt;NOAA_METAR_current_wind_speed_direction&lt;/EM&gt; from the MapServer. However, the&amp;nbsp;Wind Speed&amp;nbsp;is displayed in&lt;STRONG&gt; km/h&lt;/STRONG&gt; and I would like convert it to &lt;STRONG&gt;mph.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="391696" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/391696_pastedImage_9.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;However, I've been unsuccessful in getting a function for converting the data to work. What ultimately happens is that when I 'ok' the script in the Custom Attribute Display, nothing will happen, and when I reopen to check the script - it has disappeared.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="391709" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/391709_pastedImage_10.png" style="width: 620px; height: 396px;" /&gt;&lt;/P&gt;&lt;P&gt;I've attempted to enter a simple divide function, tried closing the function in &amp;lt;script&amp;gt; &amp;lt;/script&amp;gt;, etc and it all disappears when I reopen the Custom Attribute Display. I'm almost thinking that AGOL doesn't allow you to apply conversions to the data.&lt;/P&gt;&lt;P&gt;If anyone has advice on how to convert km/h to mph successfully, it would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If further clarification is needed, please let me know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Dec 2017 16:47:03 GMT</pubDate>
    <dc:creator>AmberCline</dc:creator>
    <dc:date>2017-12-27T16:47:03Z</dc:date>
    <item>
      <title>javascript in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/javascript-in-arcgis-online/m-p/181156#M8888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm attempting to use javascript in ArcGIS Online's popup in the mapviewer and am having some issues with getting a function to stick with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added a LiveFeed layer, &lt;EM&gt;NOAA_METAR_current_wind_speed_direction&lt;/EM&gt; from the MapServer. However, the&amp;nbsp;Wind Speed&amp;nbsp;is displayed in&lt;STRONG&gt; km/h&lt;/STRONG&gt; and I would like convert it to &lt;STRONG&gt;mph.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="391696" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/391696_pastedImage_9.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;However, I've been unsuccessful in getting a function for converting the data to work. What ultimately happens is that when I 'ok' the script in the Custom Attribute Display, nothing will happen, and when I reopen to check the script - it has disappeared.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="391709" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/391709_pastedImage_10.png" style="width: 620px; height: 396px;" /&gt;&lt;/P&gt;&lt;P&gt;I've attempted to enter a simple divide function, tried closing the function in &amp;lt;script&amp;gt; &amp;lt;/script&amp;gt;, etc and it all disappears when I reopen the Custom Attribute Display. I'm almost thinking that AGOL doesn't allow you to apply conversions to the data.&lt;/P&gt;&lt;P&gt;If anyone has advice on how to convert km/h to mph successfully, it would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If further clarification is needed, please let me know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2017 16:47:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/javascript-in-arcgis-online/m-p/181156#M8888</guid>
      <dc:creator>AmberCline</dc:creator>
      <dc:date>2017-12-27T16:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: javascript in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/javascript-in-arcgis-online/m-p/181157#M8889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/155701"&gt;Amber Cline&lt;/A&gt;‌ - Yes! They recently added this capability for Javascript logic to popups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups.htm#ESRI_SECTION1_BE0D1CA2E46742F18E7D442FB2E0F47D" title="http://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups.htm#ESRI_SECTION1_BE0D1CA2E46742F18E7D442FB2E0F47D"&gt;Configure pop-ups—ArcGIS Online Help | ArcGIS&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/ideas/12957-arcade-in-popup"&gt;Arcade in Popup&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/arcade/" title="https://developers.arcgis.com/arcade/"&gt;ArcGIS Arcade | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let us know if this works! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this now to swap internal links to external URLs with the Replace function to change text in a string of a field, as another example. It's sweet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2017 18:30:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/javascript-in-arcgis-online/m-p/181157#M8889</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-12-28T18:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: javascript in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/javascript-in-arcgis-online/m-p/181158#M8890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Arcade will be your best method to covert the windspeed using attribute expressions.&amp;nbsp;Here is the html that is supported through the html editor in pop ups:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm" title="http://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm"&gt;Supported HTML—ArcGIS Online Help | ArcGIS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Dec 2017 18:53:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/javascript-in-arcgis-online/m-p/181158#M8890</guid>
      <dc:creator>KellyGerrow</dc:creator>
      <dc:date>2017-12-29T18:53:25Z</dc:date>
    </item>
  </channel>
</rss>

