<?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 Showing image icons in pop-up conditionally based on field attributes. in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/showing-image-icons-in-pop-up-conditionally-based/m-p/1518676#M14243</link>
    <description>&lt;P&gt;Hello, I wish to replicate something along the lines of what is being done in this application, where you select a point feature on the map and at the bottom you will see icons based on whether a particular attribute is TRUE or FALSE.&amp;nbsp;&lt;A href="https://maps.transport.nsw.gov.au/egeomaps/rest-areas/index.html" target="_blank" rel="noopener"&gt;Rest Areas (nsw.gov.au)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NigelGriffiths_0-1723505525442.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/112199i15388D6E84A80740/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NigelGriffiths_0-1723505525442.png" alt="NigelGriffiths_0-1723505525442.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The attribute table looks like so:&lt;/P&gt;&lt;TABLE width="218"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_bbq&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_caravan_disposal&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_emergency_phones&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_lighting&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_litter_bins&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_picnic_table&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_playground&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_power_outlets&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_shelter&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_toilets&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;is_accessible&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Is there a way this could be easily replicated in Experience Builder, using ArcGIS Pro, Web Map Viewer, or directly within Experience Builder in which it will ultimately be consumed.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2024 23:37:38 GMT</pubDate>
    <dc:creator>NigelGriffiths</dc:creator>
    <dc:date>2024-08-12T23:37:38Z</dc:date>
    <item>
      <title>Showing image icons in pop-up conditionally based on field attributes.</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/showing-image-icons-in-pop-up-conditionally-based/m-p/1518676#M14243</link>
      <description>&lt;P&gt;Hello, I wish to replicate something along the lines of what is being done in this application, where you select a point feature on the map and at the bottom you will see icons based on whether a particular attribute is TRUE or FALSE.&amp;nbsp;&lt;A href="https://maps.transport.nsw.gov.au/egeomaps/rest-areas/index.html" target="_blank" rel="noopener"&gt;Rest Areas (nsw.gov.au)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NigelGriffiths_0-1723505525442.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/112199i15388D6E84A80740/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NigelGriffiths_0-1723505525442.png" alt="NigelGriffiths_0-1723505525442.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The attribute table looks like so:&lt;/P&gt;&lt;TABLE width="218"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_bbq&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_caravan_disposal&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_emergency_phones&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_lighting&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_litter_bins&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_picnic_table&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_playground&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_power_outlets&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_shelter&lt;/TD&gt;&lt;TD width="64"&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;has_toilets&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="154"&gt;is_accessible&lt;/TD&gt;&lt;TD width="64"&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Is there a way this could be easily replicated in Experience Builder, using ArcGIS Pro, Web Map Viewer, or directly within Experience Builder in which it will ultimately be consumed.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 23:37:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/showing-image-icons-in-pop-up-conditionally-based/m-p/1518676#M14243</guid>
      <dc:creator>NigelGriffiths</dc:creator>
      <dc:date>2024-08-12T23:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Showing image icons in pop-up conditionally based on field attributes.</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/showing-image-icons-in-pop-up-conditionally-based/m-p/1518927#M14249</link>
      <description>&lt;P&gt;We had to use a monstrous hack to do something similar directly in Experience Builder, creating an expression to source an image from a webserver based on attribute values in the URL field.&lt;/P&gt;&lt;P&gt;However, yours looks like it could be done with by adding a simple Arcade expression into the popup config. Configure it in the Map/Scene Viewer:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var t =  $feature.COMMONNAME;
var v = "https://placebear.com/200/300";


return {
    type: 'fields',
    //title: '',
    //description : '',
    fieldInfos:  [{
          fieldName: "att1"  // fieldName should match the key in the attributes dictionary
        },
        {
          fieldName: "att2"  // fieldName should match the key in the attributes dictionary
        },
        {
          fieldName: "att3"  // fieldName should match the key in the attributes dictionary
        }],
    attributes : {att1 : t, att2 : "&amp;lt;img src=\"" + v + "\" /&amp;gt;", att3 : 4}  // replace this dictionary with your own key-value pairs
  }&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I've tested and yes, the HTML element in the attribute object is rendered properly.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 08:38:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/showing-image-icons-in-pop-up-conditionally-based/m-p/1518927#M14249</guid>
      <dc:creator>GIS_Weasel</dc:creator>
      <dc:date>2024-08-13T08:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Showing image icons in pop-up conditionally based on field attributes.</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/showing-image-icons-in-pop-up-conditionally-based/m-p/1521126#M14274</link>
      <description>&lt;P&gt;Thank you very much for your suggestion. I was able to achieve the desired result by having an arcade attribute expression for each field and image, then having a text element above the fields table that included the expression in HTML code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Desired result below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NigelGriffiths_0-1723615681091.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/112283i53FE76B6E259F23A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NigelGriffiths_0-1723615681091.png" alt="NigelGriffiths_0-1723615681091.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Arcade expression used for each image&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var checkvalue = $feature.has_toilets
var img_show = 'https://imageurl.com'
var img_blank = ''
iif(checkvalue=='TRUE',img_show,img_blank)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NigelGriffiths_1-1723615727296.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/112284i56EBD0BD3E3CD1D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NigelGriffiths_1-1723615727296.jpeg" alt="NigelGriffiths_1-1723615727296.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The following HTML code was placed into the text pop-up element&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;img src="{expression/expr0}" width="50" border="0"&amp;gt;&amp;lt;img src="{expression/expr1}" width="50" border="0"&amp;gt;&amp;lt;img src="{expression/expr2}" width="50" border="0"&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am unsure if your method is the better solution, as I have limited experience with Arcade so was unsure how exactly to implement it.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 06:13:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/showing-image-icons-in-pop-up-conditionally-based/m-p/1521126#M14274</guid>
      <dc:creator>NigelGriffiths</dc:creator>
      <dc:date>2024-08-14T06:13:45Z</dc:date>
    </item>
  </channel>
</rss>

