<?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 ArcGIS dashboard indicator formatting with colors in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-indicator-formatting-with-colors/m-p/1192025#M6548</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm formatting an indicator dashboard element. I'm trying to make the first word white and the value(datapoint["count"]) yellow which reflects the data sum of the feature class. Any feedback would be helpful!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I tried so far but doesn't do what I want.&lt;/P&gt;&lt;P&gt;var count =&amp;nbsp;$datapoint["count"];&lt;BR /&gt;var color = IIF(count == $datapoint["count"])&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return topColor: '#FFFF00' ,&lt;/P&gt;&lt;P&gt;} else {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; return topColor: '#&lt;SPAN&gt;FFFFFF&lt;/SPAN&gt;',&amp;nbsp;&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return {&lt;BR /&gt;//textColor:'',&lt;BR /&gt;backgroundColor:'#000000',&lt;BR /&gt;topText:'Open Projects:' + '' + data,&lt;BR /&gt;&lt;BR /&gt;//attributes: {&lt;BR /&gt;// attribute1: '',&lt;BR /&gt;// attribute2: ''&lt;BR /&gt;// }&lt;BR /&gt;&lt;BR /&gt;topTextColor: &lt;STRONG&gt;color,&lt;/STRONG&gt;&lt;BR /&gt;topTextOutlineColor: '',&lt;BR /&gt;topTextMaxSize: 'medium',&lt;BR /&gt;middleText: 'Month: July',&lt;BR /&gt;middleTextColor: '#FFFF00',&lt;BR /&gt;middleTextOutlineColor: '#FFFF00',&lt;BR /&gt;middleTextMaxSize: 'small',&lt;BR /&gt;&lt;BR /&gt;//bottomTextOutlineColor: '',&lt;BR /&gt;//bottomTextMaxSize: 'medium',&lt;BR /&gt;//iconName:'',&lt;BR /&gt;//iconAlign:'left',&lt;BR /&gt;//iconColor:'',&lt;BR /&gt;//iconOutlineColor:'',&lt;BR /&gt;//noValue:false,&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2022 18:55:47 GMT</pubDate>
    <dc:creator>GeorgeJones9282</dc:creator>
    <dc:date>2022-07-13T18:55:47Z</dc:date>
    <item>
      <title>ArcGIS dashboard indicator formatting with colors</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-indicator-formatting-with-colors/m-p/1192025#M6548</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm formatting an indicator dashboard element. I'm trying to make the first word white and the value(datapoint["count"]) yellow which reflects the data sum of the feature class. Any feedback would be helpful!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I tried so far but doesn't do what I want.&lt;/P&gt;&lt;P&gt;var count =&amp;nbsp;$datapoint["count"];&lt;BR /&gt;var color = IIF(count == $datapoint["count"])&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return topColor: '#FFFF00' ,&lt;/P&gt;&lt;P&gt;} else {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; return topColor: '#&lt;SPAN&gt;FFFFFF&lt;/SPAN&gt;',&amp;nbsp;&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return {&lt;BR /&gt;//textColor:'',&lt;BR /&gt;backgroundColor:'#000000',&lt;BR /&gt;topText:'Open Projects:' + '' + data,&lt;BR /&gt;&lt;BR /&gt;//attributes: {&lt;BR /&gt;// attribute1: '',&lt;BR /&gt;// attribute2: ''&lt;BR /&gt;// }&lt;BR /&gt;&lt;BR /&gt;topTextColor: &lt;STRONG&gt;color,&lt;/STRONG&gt;&lt;BR /&gt;topTextOutlineColor: '',&lt;BR /&gt;topTextMaxSize: 'medium',&lt;BR /&gt;middleText: 'Month: July',&lt;BR /&gt;middleTextColor: '#FFFF00',&lt;BR /&gt;middleTextOutlineColor: '#FFFF00',&lt;BR /&gt;middleTextMaxSize: 'small',&lt;BR /&gt;&lt;BR /&gt;//bottomTextOutlineColor: '',&lt;BR /&gt;//bottomTextMaxSize: 'medium',&lt;BR /&gt;//iconName:'',&lt;BR /&gt;//iconAlign:'left',&lt;BR /&gt;//iconColor:'',&lt;BR /&gt;//iconOutlineColor:'',&lt;BR /&gt;//noValue:false,&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 18:55:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-indicator-formatting-with-colors/m-p/1192025#M6548</guid>
      <dc:creator>GeorgeJones9282</dc:creator>
      <dc:date>2022-07-13T18:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS dashboard indicator formatting with colors</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-indicator-formatting-with-colors/m-p/1192098#M6549</link>
      <description>&lt;P&gt;How is your indicator configured? It's showing a sum? If you're aggregating the data in your indicator, the count of the records won't be directly accessible in the&amp;nbsp;&lt;STRONG&gt;$datapoint&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;You may be able to do this&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;with a&amp;nbsp;&lt;STRONG&gt;reference value&lt;/STRONG&gt;. Your reference value can be the count, the value can be the sum.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1657762829671.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/45851iE8218514E322C8EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1657762829671.png" alt="jcarlson_0-1657762829671.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then in your Arcade, you can reference the&amp;nbsp;&lt;STRONG&gt;$reference&lt;/STRONG&gt; value.&lt;/P&gt;&lt;P&gt;In regards to your Arcade itself, the&amp;nbsp;&lt;STRONG&gt;Iif&amp;nbsp;&lt;/STRONG&gt;function is not followed by curly brackets. It follows the format Iif(condition, return_if_true, return_if_false).&lt;/P&gt;&lt;P&gt;Also, in your conditions, you are using the keyword&amp;nbsp;&lt;STRONG&gt;return&lt;/STRONG&gt;. When your expression encounters a return, it&amp;nbsp;&lt;EM&gt;stops&lt;/EM&gt; and returns whatever value follows that keyword, so only do that if you're at the "end" of your expression.&lt;/P&gt;&lt;P&gt;I'd love to give you a sample expression, but I'd need to know a bit more about how your indicator is configured, and possibly details about the data itself. Any chance the layer is public?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 01:53:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-indicator-formatting-with-colors/m-p/1192098#M6549</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-07-14T01:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS dashboard indicator formatting with colors</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-indicator-formatting-with-colors/m-p/1192171#M6551</link>
      <description>&lt;P&gt;Hey Josh, this data&amp;nbsp; is private within the Army National Guard org but I think you gave me enough to steer me in the right direction. Data is the total count of the construction projects across the state. However, in one of the examples I looked at here worked:&lt;/P&gt;&lt;P&gt;var color =&amp;nbsp; IIF($datapoint.Velocity == 0, '#F3DED7', '')&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the below code, I couldn't pass the color property into the variable and thus the text value was still white afterwards.&lt;/P&gt;&lt;P&gt;var data = IIF($reference.count == 109, '#e6e600', '');&lt;/P&gt;&lt;P&gt;return {&lt;BR /&gt;//textColor:'',&lt;BR /&gt;backgroundColor:'#000000',&lt;BR /&gt;topText:'Open Projects:' + ' ' + data,&lt;BR /&gt;&lt;BR /&gt;//attributes: {&lt;BR /&gt;// attribute1: '',&lt;BR /&gt;// attribute2: ''&lt;BR /&gt;// }&lt;BR /&gt;&lt;BR /&gt;topTextColor: '#FFFFFF',&lt;BR /&gt;topTextOutlineColor: '',&lt;BR /&gt;topTextMaxSize: 'medium',&lt;BR /&gt;middleText: 'Month: July',&lt;BR /&gt;middleTextColor: '#FFFF00',&lt;BR /&gt;middleTextOutlineColor: '#FFFF00',&lt;BR /&gt;middleTextMaxSize: 'small',&lt;BR /&gt;&lt;BR /&gt;//bottomTextOutlineColor: '',&lt;BR /&gt;//bottomTextMaxSize: 'medium',&lt;BR /&gt;//iconName:'',&lt;BR /&gt;//iconAlign:'left',&lt;BR /&gt;//iconColor:'',&lt;BR /&gt;//iconOutlineColor:'',&lt;BR /&gt;//noValue:false,&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time!- George&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 17:58:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-indicator-formatting-with-colors/m-p/1192171#M6551</guid>
      <dc:creator>GeorgeJones9282</dc:creator>
      <dc:date>2022-07-14T17:58:30Z</dc:date>
    </item>
  </channel>
</rss>

