<?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: Arcade expression to control text color in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242945#M7139</link>
    <description>&lt;P&gt;Hi Jennifer, thank you for the input.&lt;/P&gt;&lt;P&gt;I have applied the arcade expression and set&amp;nbsp; textColor: color to call my variable color. No results.&amp;nbsp; Is there a step I am missing?&lt;/P&gt;&lt;P&gt;var color = When(&lt;BR /&gt;$datapoint.division == 'Central Arizona', '#AC734A',&lt;BR /&gt;$datapoint.division == 'Piaute Pipeline', '#84AC4A',&lt;BR /&gt;$datapoint.division == 'Southern Nevada', '#4A99AC', '')&lt;BR /&gt;&lt;BR /&gt;return {&lt;BR /&gt;textColor: color,&lt;BR /&gt;backgroundColor: '',&lt;BR /&gt;separatorColor: '',&lt;BR /&gt;selectionColor: '',&lt;BR /&gt;selectionTextColor: '',&lt;BR /&gt;// attributes: {&lt;BR /&gt;// attribute1: '',&lt;BR /&gt;// attribute2: ''&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="JohnMedema_0-1671635049547.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59015i66E020514908C485/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnMedema_0-1671635049547.png" alt="JohnMedema_0-1671635049547.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 15:05:43 GMT</pubDate>
    <dc:creator>JohnMedema</dc:creator>
    <dc:date>2022-12-21T15:05:43Z</dc:date>
    <item>
      <title>Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242845#M7135</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to control the background color of a list element using an arcade expression.&amp;nbsp; The $datapoint.division contains several string values e.g. Central Arizona.&amp;nbsp; Ideally I would like this expression to execute based on the various division values and color code the background of each list element based on the string value of $datapoint.division.&lt;/P&gt;&lt;P&gt;Here is my expression.&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16421"&gt;@DougBrowning&lt;/a&gt;&amp;nbsp;, figured you can solve this in the blink of an eye.&lt;/P&gt;&lt;P&gt;var color = IIF($datapoint.division == "Central Arizona", '#F3DED7', '')&lt;BR /&gt;return {&lt;BR /&gt;textColor: '',&lt;BR /&gt;backgroundColor: color,&lt;BR /&gt;separatorColor:'',&lt;BR /&gt;selectionColor: '',&lt;BR /&gt;selectionTextColor: '',&lt;BR /&gt;// attributes: {&lt;BR /&gt;// attribute1: '',&lt;BR /&gt;// attribute2: ''&lt;BR /&gt;// }&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 22:42:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242845#M7135</guid>
      <dc:creator>JohnMedema</dc:creator>
      <dc:date>2022-12-20T22:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242916#M7137</link>
      <description>&lt;P&gt;Is this post attempting the same idea?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/td-p/704981" target="_blank"&gt;https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/td-p/704981&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 13:12:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242916#M7137</guid>
      <dc:creator>KinleyWinchester</dc:creator>
      <dc:date>2022-12-21T13:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242917#M7138</link>
      <description>&lt;LI-CODE lang="c"&gt;var color = When( 
        $datapoint.division == 'Central Arizona', '#F3DED7', 
        $datapoint.division == 'Northern Arizona', '#981e1d', 
        $datapoint.division == 'Southern Arizona', '#f7b538', '') &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-dashboards-blog/dashboards-that-pop-arcade/ba-p/1241244" target="_self"&gt;Dashboards That Pop: Arcade&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 13:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242917#M7138</guid>
      <dc:creator>JenniferAcunto</dc:creator>
      <dc:date>2022-12-21T13:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242945#M7139</link>
      <description>&lt;P&gt;Hi Jennifer, thank you for the input.&lt;/P&gt;&lt;P&gt;I have applied the arcade expression and set&amp;nbsp; textColor: color to call my variable color. No results.&amp;nbsp; Is there a step I am missing?&lt;/P&gt;&lt;P&gt;var color = When(&lt;BR /&gt;$datapoint.division == 'Central Arizona', '#AC734A',&lt;BR /&gt;$datapoint.division == 'Piaute Pipeline', '#84AC4A',&lt;BR /&gt;$datapoint.division == 'Southern Nevada', '#4A99AC', '')&lt;BR /&gt;&lt;BR /&gt;return {&lt;BR /&gt;textColor: color,&lt;BR /&gt;backgroundColor: '',&lt;BR /&gt;separatorColor: '',&lt;BR /&gt;selectionColor: '',&lt;BR /&gt;selectionTextColor: '',&lt;BR /&gt;// attributes: {&lt;BR /&gt;// attribute1: '',&lt;BR /&gt;// attribute2: ''&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="JohnMedema_0-1671635049547.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59015i66E020514908C485/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnMedema_0-1671635049547.png" alt="JohnMedema_0-1671635049547.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 15:05:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242945#M7139</guid>
      <dc:creator>JohnMedema</dc:creator>
      <dc:date>2022-12-21T15:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242951#M7140</link>
      <description>&lt;P&gt;Have you double checked your Division values? You want to use the name value and not the label. Are you using the Globals tab to add your field to your expression? If not, do that so that you know the syntax is correct. Also, try returning it as an attribute and then simply calling that in your list. That way you can see what, if anything your statement is returning.&amp;nbsp;&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="JenniferAcunto_1-1671635770839.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59017i2A357849A8FFBC02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JenniferAcunto_1-1671635770839.png" alt="JenniferAcunto_1-1671635770839.png" /&gt;&lt;/span&gt;&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="JenniferAcunto_2-1671635803292.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59018i5513995875E98E88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JenniferAcunto_2-1671635803292.png" alt="JenniferAcunto_2-1671635803292.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 15:17:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242951#M7140</guid>
      <dc:creator>JenniferAcunto</dc:creator>
      <dc:date>2022-12-21T15:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242954#M7141</link>
      <description>&lt;P&gt;Thank you Jennifer!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 15:31:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1242954#M7141</guid>
      <dc:creator>JohnMedema</dc:creator>
      <dc:date>2022-12-21T15:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1323247#M8385</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/160974"&gt;@JenniferAcunto&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Hope all is well, so I too have a color related question, figured I should ask it here. Based on the code (&lt;A href="https://developers.arcgis.com/arcade/guide/template-literals/" target="_self" rel="nofollow noopener noreferrer"&gt;template literals&lt;/A&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;) below how can I change the color individually of each text string and field value?&lt;BR /&gt;&lt;BR /&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;for (var f in intersectLayer){ 
   popup += `&amp;lt;b&amp;gt;Area:&amp;lt;/b&amp;gt; ${f.AREAFT} &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;

  
  &amp;lt;b&amp;gt;Length:&amp;lt;/b&amp;gt; ${f.LENFT} &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
  
  
  &amp;lt;b&amp;gt;ID:&amp;lt;/b&amp;gt; ${f.ID} &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
`
}  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Desired Output:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Area: &lt;FONT color="#0000FF"&gt;Value&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;Length: &lt;FONT color="#003300"&gt;&lt;FONT color="#00FF00"&gt;Value&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#0000FF"&gt;ID&lt;/FONT&gt;: &lt;FONT color="#FF0000"&gt;Value&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 23:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1323247#M8385</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-08-28T23:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1323622#M8392</link>
      <description>&lt;P&gt;I'm not really an Arcade person. I just know a few tricks I use for Dashboards. I recommend you post this as a question so that the general community can see it.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 18:59:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1323622#M8392</guid>
      <dc:creator>JenniferAcunto</dc:creator>
      <dc:date>2023-08-29T18:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control text color</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1323660#M8393</link>
      <description>&lt;P&gt;No worries and thank you for the quick response &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 20:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-expression-to-control-text-color/m-p/1323660#M8393</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2023-08-29T20:19:43Z</dc:date>
    </item>
  </channel>
</rss>

