<?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 Arcade Code IIF Statement for List Item showing Status Change in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704981#M3777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, this is my first attempt at trying to use Arcade in Operations Dashboard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to change the List Item background color based on the Survey status. I'm having difficulty trying to get this Arcade code to work. See code sample and screen shots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;// Status of Survey entry&lt;BR /&gt;var color = IIF($datapoint.status == open, '#FFBEBE', '');&lt;BR /&gt;var color = IIF(datapoint.status == closed, '#D3FFBE','');&lt;BR /&gt;var color = IIF(datapoint.status == inprocess, '#BEE8FF','');&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance you can provide me with. I'd like to try and change the Background color for Status - (open, closed and inprocess).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Colleen Madigan Schelde&lt;/P&gt;&lt;P&gt;Senior GIS Specialist&lt;/P&gt;&lt;P&gt;Radiuselnet&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:comas@radiuselnet.dk"&gt;comas@radiuselnet.dk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;+45 9955 6902&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jul 2020 07:38:22 GMT</pubDate>
    <dc:creator>deleted-user-sNUdtFrn2yEY</dc:creator>
    <dc:date>2020-07-17T07:38:22Z</dc:date>
    <item>
      <title>Arcade Code IIF Statement for List Item showing Status Change</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704981#M3777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, this is my first attempt at trying to use Arcade in Operations Dashboard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to change the List Item background color based on the Survey status. I'm having difficulty trying to get this Arcade code to work. See code sample and screen shots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;// Status of Survey entry&lt;BR /&gt;var color = IIF($datapoint.status == open, '#FFBEBE', '');&lt;BR /&gt;var color = IIF(datapoint.status == closed, '#D3FFBE','');&lt;BR /&gt;var color = IIF(datapoint.status == inprocess, '#BEE8FF','');&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance you can provide me with. I'd like to try and change the Background color for Status - (open, closed and inprocess).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Colleen Madigan Schelde&lt;/P&gt;&lt;P&gt;Senior GIS Specialist&lt;/P&gt;&lt;P&gt;Radiuselnet&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:comas@radiuselnet.dk"&gt;comas@radiuselnet.dk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;+45 9955 6902&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2020 07:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704981#M3777</guid>
      <dc:creator>deleted-user-sNUdtFrn2yEY</dc:creator>
      <dc:date>2020-07-17T07:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Code IIF Statement for List Item showing Status Change</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704982#M3778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to do this -&amp;nbsp;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/ops-dashboard/real-time/getting-started-with-arcade-in-arcgis-dashboards/" title="https://www.esri.com/arcgis-blog/products/ops-dashboard/real-time/getting-started-with-arcade-in-arcgis-dashboards/"&gt;Getting started with Arcade in the ArcGIS Dashboards Beta&lt;/A&gt;&amp;nbsp;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="/legacyfs/online/500517_Arcade Code Example 3.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2020 07:55:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704982#M3778</guid>
      <dc:creator>deleted-user-sNUdtFrn2yEY</dc:creator>
      <dc:date>2020-07-17T07:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Code IIF Statement for List Item showing Status Change</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704983#M3779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/311750" target="_blank"&gt;Colleen Madigan Schelde&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On lines 2, 3 and 4 of the original code. when you want to validate if&amp;nbsp;the status is open, closed or in process, you will have to enclose those values in quotes. The other change required is that you will want to not use quotes when you access the&amp;nbsp;values assigned to the color variable (see line 13). In the example below I have changed the first part of the code to make it a little bit more readable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// Status of Survey entry&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; color &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datapoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;status &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'open'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    color &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'#FFBEBE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datapoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;status &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'closed'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    color &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'#D3FFBE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datapoint&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;status &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'inprocess'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    color &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'#BEE8FF'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    textColor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    backgroundColor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; color&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    separatorColor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    selectionColor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    selectionTextColor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// attributes: {&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// attribute1: '',&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// attribute2: ''&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// }&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704983#M3779</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T05:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Code IIF Statement for List Item showing Status Change</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704984#M3780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xander -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your quick response and help with my question! This is so awesome and very much appreciated. Have a great day! It works great!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Colleen Madigan Schelde&lt;/P&gt;&lt;P&gt;Radiuselnet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2020 06:54:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/704984#M3780</guid>
      <dc:creator>deleted-user-sNUdtFrn2yEY</dc:creator>
      <dc:date>2020-07-20T06:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Code IIF Statement for List Item showing Status Change</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/1569841#M10591</link>
      <description>&lt;P&gt;Hi Xander, can't you consolidate all the elseifs into a single if by using OR (||)?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:52:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-iif-statement-for-list-item-showing/m-p/1569841#M10591</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2024-12-18T16:52:28Z</dc:date>
    </item>
  </channel>
</rss>

