<?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: JSAPI toggle field visibility in Popup based on field value? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/jsapi-toggle-field-visibility-in-popup-based-on/m-p/96042#M589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No not using the popup template but you can define a function that will be used to render the popup content. In the function you could then check for the presence of a value and add it to the popup.&amp;nbsp; Here's a link to an older sample that shows how this works: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/widget_infowindowchart.html" title="https://developers.arcgis.com/javascript/jssamples/widget_infowindowchart.html"&gt;Info window with chart | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 May 2015 19:45:49 GMT</pubDate>
    <dc:creator>KellyHutchins</dc:creator>
    <dc:date>2015-05-01T19:45:49Z</dc:date>
    <item>
      <title>JSAPI toggle field visibility in Popup based on field value?</title>
      <link>https://community.esri.com/t5/developers-questions/jsapi-toggle-field-visibility-in-popup-based-on/m-p/96041#M588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset with a lot of missing attribution.&amp;nbsp; As opposed to presenting the user with a popup that shows a bunch of empty values I'd like to toggle the visibility based on whether the particular field has a value.&amp;nbsp; so for instance for a given fieldname definition:&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;SPAN style="color: #a31515; font-size: 10pt; font-family: Consolas;"&gt;{fieldname: "DPTH_M"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;, label: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: 10pt; font-family: Consolas;"&gt;"Depth (meters): "&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;, visible: &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; },&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;if DPTH_M was empty I would not want to display this in the popup.&amp;nbsp; Can visibility be toggled true or false based on this requirement?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 17:18:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/jsapi-toggle-field-visibility-in-popup-based-on/m-p/96041#M588</guid>
      <dc:creator>JosephWallis</dc:creator>
      <dc:date>2015-04-27T17:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: JSAPI toggle field visibility in Popup based on field value?</title>
      <link>https://community.esri.com/t5/developers-questions/jsapi-toggle-field-visibility-in-popup-based-on/m-p/96042#M589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No not using the popup template but you can define a function that will be used to render the popup content. In the function you could then check for the presence of a value and add it to the popup.&amp;nbsp; Here's a link to an older sample that shows how this works: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/widget_infowindowchart.html" title="https://developers.arcgis.com/javascript/jssamples/widget_infowindowchart.html"&gt;Info window with chart | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2015 19:45:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/jsapi-toggle-field-visibility-in-popup-based-on/m-p/96042#M589</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-05-01T19:45:49Z</dc:date>
    </item>
  </channel>
</rss>

