<?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: adding arcade expression used in advanced formatting in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/adding-arcade-expression-used-in-advanced/m-p/1385711#M9128</link>
    <description>&lt;P&gt;You need the attribute section of the return statement, like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var daysSince = round(DateDiff(Today(), $datapoint.LastInsp,'days'))
var alert = 100
var bkgrnd = IIF(daysSince &amp;gt; alert,'#FF7f7f','')
return {
  textColor: '',
  backgroundColor: bkgrnd,
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
   attributes: {
     numDays: daysSince,
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You would then call it in your HTML list with {expression/numDays}&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 21:11:11 GMT</pubDate>
    <dc:creator>marksm_macomb</dc:creator>
    <dc:date>2024-02-22T21:11:11Z</dc:date>
    <item>
      <title>adding arcade expression used in advanced formatting</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/adding-arcade-expression-used-in-advanced/m-p/1385693#M9126</link>
      <description>&lt;P&gt;I have used the advanced formatting to calculate the number of days since a location was inspected, if that value is over 99 the background in a list item turns red. I'd like to be able to display that value in the text of the list, but cannot figure out how to convert that from the advanced formatting code to a value that can be shown elsewhere. In the screen shot below, I'd like to have the text read "It has been XX days since this property was visited" positioned after the last visit date.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clt_cabq_0-1708634859680.png" style="width: 275px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95553i99B86E763D4D4666/image-dimensions/275x216?v=v2" width="275" height="216" role="button" title="clt_cabq_0-1708634859680.png" alt="clt_cabq_0-1708634859680.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My code for the formatting looks like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// calculates the number of days since a location has been inspected, if greater than 100 days then the background turns Red
var daysSince = round(DateDiff(Today(), $datapoint.LastInsp,'days'))
var alert = 100
var bkgrnd = IIF(daysSince &amp;gt; alert,'#FF7f7f','')
return {
  textColor: '',
  backgroundColor: bkgrnd,
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 20:50:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/adding-arcade-expression-used-in-advanced/m-p/1385693#M9126</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-02-22T20:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: adding arcade expression used in advanced formatting</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/adding-arcade-expression-used-in-advanced/m-p/1385711#M9128</link>
      <description>&lt;P&gt;You need the attribute section of the return statement, like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var daysSince = round(DateDiff(Today(), $datapoint.LastInsp,'days'))
var alert = 100
var bkgrnd = IIF(daysSince &amp;gt; alert,'#FF7f7f','')
return {
  textColor: '',
  backgroundColor: bkgrnd,
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
   attributes: {
     numDays: daysSince,
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You would then call it in your HTML list with {expression/numDays}&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 21:11:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/adding-arcade-expression-used-in-advanced/m-p/1385711#M9128</guid>
      <dc:creator>marksm_macomb</dc:creator>
      <dc:date>2024-02-22T21:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: adding arcade expression used in advanced formatting</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/adding-arcade-expression-used-in-advanced/m-p/1385725#M9129</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/670616"&gt;@marksm_macomb&lt;/a&gt;&amp;nbsp;thanks! much easier than I realized. I had tried something similar to that but didn't work so something must have been formatted incorrectly in my previous attempt.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 21:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/adding-arcade-expression-used-in-advanced/m-p/1385725#M9129</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-02-22T21:23:53Z</dc:date>
    </item>
  </channel>
</rss>

