<?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 EB List Icon Advanced Formatting not accepting color in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1552849#M10428</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am attempting to color the 'symbol / icon' on my List to correspond to a specific color, yet the iconColor variable is not accepting the color value of 'icon_color'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var icon_color = decode($datapoint.projtype,
  'Facilities', '#AB6629',
  'Maintenance', '#A73599',
  'Parks', '#30A625',
  'Street Improvements', '#314AA7',
  'Traffic Signals', '#813643',
  'Transportation', '#728238',
  'Other', '#828282', 'white',
);

return {
  textColor: '',
  //backgroundColor: icon_color,
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
  iconColor: icon_color,
  //attributes: {
        // attribute2: ''
   // }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&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="Amarz_1-1730131185911.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118241i39722C3F05BAC41B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amarz_1-1730131185911.png" alt="Amarz_1-1730131185911.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2024 16:01:38 GMT</pubDate>
    <dc:creator>amarcz_cc</dc:creator>
    <dc:date>2024-10-28T16:01:38Z</dc:date>
    <item>
      <title>EB List Icon Advanced Formatting not accepting color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1552849#M10428</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am attempting to color the 'symbol / icon' on my List to correspond to a specific color, yet the iconColor variable is not accepting the color value of 'icon_color'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var icon_color = decode($datapoint.projtype,
  'Facilities', '#AB6629',
  'Maintenance', '#A73599',
  'Parks', '#30A625',
  'Street Improvements', '#314AA7',
  'Traffic Signals', '#813643',
  'Transportation', '#728238',
  'Other', '#828282', 'white',
);

return {
  textColor: '',
  //backgroundColor: icon_color,
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
  iconColor: icon_color,
  //attributes: {
        // attribute2: ''
   // }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&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="Amarz_1-1730131185911.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118241i39722C3F05BAC41B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amarz_1-1730131185911.png" alt="Amarz_1-1730131185911.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 16:01:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1552849#M10428</guid>
      <dc:creator>amarcz_cc</dc:creator>
      <dc:date>2024-10-28T16:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: EB List Icon Advanced Formatting not accepting color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1552857#M10429</link>
      <description>&lt;P&gt;Where are you trying to enter this code? Are you on Developer Edition?&lt;/P&gt;&lt;P&gt;Regardless, Experience Builder does not support Arcade except through options in the webmap. There is a method for getting different images/colors in a List Widget mentioned in this post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://community.esri.com/t5/experience-builder-tips-and-tricks/using-a-table-to-update-and-control-an-experience/ba-p/1543917" target="_blank"&gt;https://community.esri.com/t5/experience-builder-tips-and-tricks/using-a-table-to-update-and-control-an-experience/ba-p/1543917&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This one covers the specifics in more detail. It's more focused on the images, but the images could just be colored squares.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/experience-builder-tips-and-tricks/create-a-map-tips-widget-with-images-and-text/ba-p/1412359" target="_blank"&gt;https://community.esri.com/t5/experience-builder-tips-and-tricks/create-a-map-tips-widget-with-images-and-text/ba-p/1412359&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 16:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1552857#M10429</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2024-10-28T16:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: EB List Icon Advanced Formatting not accepting color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1552892#M10430</link>
      <description>&lt;P&gt;Apologies, this was meant for the Dashboards page, not ExB.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 17:14:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1552892#M10430</guid>
      <dc:creator>amarcz_cc</dc:creator>
      <dc:date>2024-10-28T17:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: EB List Icon Advanced Formatting not accepting color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1553216#M10434</link>
      <description>&lt;P&gt;The icons in the list come directly from your layer symbology. You can't change them using Arcade. You can however, turn off the icons and recreate them using Advanced Formatting and HTML.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;
var icon_color = decode($datapoint.INCIDENT_TYPE,
  'Snow', '#AB6629',
  'Hail', '#A73599',
  'Flood', '#30A625',
  'Flash Flood', '#314AA7',
  'Other', '#828282', 'white',
);

var icon = Concatenate('&amp;lt;svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="' + icon_color + '" viewBox="0 0 256 256"&amp;gt;&amp;lt;path d="M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z"&amp;gt;&amp;lt;/path&amp;gt;&amp;lt;/svg&amp;gt;')


return {
  textColor: '',
  backgroundColor: '',
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
  attributes: {
    icon: icon
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the line item template, click the source button and add the HTML.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;&amp;lt;div style="align-items:center;display:flex;"&amp;gt;
    &amp;lt;p&amp;gt;
        {expression/icon}
    &amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;
        {field/INCIDENT_TYPE}
    &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;&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="JenniferAcunto_0-1730204214041.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118326i10F5A98B08CF6D79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JenniferAcunto_0-1730204214041.png" alt="JenniferAcunto_0-1730204214041.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 12:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1553216#M10434</guid>
      <dc:creator>JenniferAcunto</dc:creator>
      <dc:date>2024-10-29T12:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: EB List Icon Advanced Formatting not accepting color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1553977#M10439</link>
      <description>&lt;P&gt;Thanks Jen! I appreciate the in-depth assistance! I was so close.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 20:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/eb-list-icon-advanced-formatting-not-accepting/m-p/1553977#M10439</guid>
      <dc:creator>amarcz_cc</dc:creator>
      <dc:date>2024-10-30T20:33:44Z</dc:date>
    </item>
  </channel>
</rss>

