<?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 Question in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-question/m-p/73874#M394</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello - I thought I could try and make this work based on Xander's help with my first Arcade code question in Operations Dashboard Beta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to change the background color on a List Element based on Total NEJ &amp;gt;= 1. (NEJ = NO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total NEJ is set as hidden and is a calculation coming from a survey built in Survey123 Connect. The survey asks multiple questions where if each question has a NEJ answer then Total NEJ equals the sum of&amp;nbsp;all the NEJ answers for all the questions in the survey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;My Arcade Code&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;// Total NEJ greater than or equal to One - Change Color Background&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;var color = '';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;if ($datapoint["total_nej"] &amp;gt;='1') {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color = '#FFBEBE';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;return {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; textColor: '',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; backgroundColor: color,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; separatorColor:'',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; selectionColor: '',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; selectionTextColor: '',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; // attributes: {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // attribute1: '',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// attribute2: ''&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; // }&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed the &lt;SPAN&gt;$datapoint["total_nej"] does not look like&amp;nbsp;$datapoint.xxxxxx that some of the other Arcade code samples look like. Can you build an Arcade statement off a calculated field?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance for any assistance you can provide and I look forward to hearing back from Esri. Have a great day!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Colleen Madigan Schelde&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Radiuselnet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="mailto:comas@radiuselnet.dk"&gt;comas@radiuselnet.dk&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;+45 9955 6902&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2020 09:43:11 GMT</pubDate>
    <dc:creator>deleted-user-sNUdtFrn2yEY</dc:creator>
    <dc:date>2020-07-22T09:43:11Z</dc:date>
    <item>
      <title>Arcade Code Question</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-question/m-p/73874#M394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello - I thought I could try and make this work based on Xander's help with my first Arcade code question in Operations Dashboard Beta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to change the background color on a List Element based on Total NEJ &amp;gt;= 1. (NEJ = NO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total NEJ is set as hidden and is a calculation coming from a survey built in Survey123 Connect. The survey asks multiple questions where if each question has a NEJ answer then Total NEJ equals the sum of&amp;nbsp;all the NEJ answers for all the questions in the survey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;My Arcade Code&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;// Total NEJ greater than or equal to One - Change Color Background&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;var color = '';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;if ($datapoint["total_nej"] &amp;gt;='1') {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color = '#FFBEBE';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;return {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; textColor: '',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; backgroundColor: color,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; separatorColor:'',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; selectionColor: '',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; selectionTextColor: '',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp; // attributes: {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // attribute1: '',&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;// attribute2: ''&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; // }&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed the &lt;SPAN&gt;$datapoint["total_nej"] does not look like&amp;nbsp;$datapoint.xxxxxx that some of the other Arcade code samples look like. Can you build an Arcade statement off a calculated field?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance for any assistance you can provide and I look forward to hearing back from Esri. Have a great day!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Colleen Madigan Schelde&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Radiuselnet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="mailto:comas@radiuselnet.dk"&gt;comas@radiuselnet.dk&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;+45 9955 6902&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2020 09:43:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-question/m-p/73874#M394</guid>
      <dc:creator>deleted-user-sNUdtFrn2yEY</dc:creator>
      <dc:date>2020-07-22T09:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Code Question</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-question/m-p/73875#M395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I figured it out!! I was missing one little item - the "&lt;STRONG&gt;}&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Here is the code:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// Total NEJ greater than or equal to One - Change Color Background&lt;BR /&gt;var color = '';&lt;BR /&gt;if ($datapoint["total_nej"] &amp;gt;= '1') {&lt;BR /&gt; color = '#FFBEBE';&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&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;Have a great day!!&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&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 07:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-code-question/m-p/73875#M395</guid>
      <dc:creator>deleted-user-sNUdtFrn2yEY</dc:creator>
      <dc:date>2020-07-23T07:33:02Z</dc:date>
    </item>
  </channel>
</rss>

