<?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 Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience. in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525366#M10190</link>
    <description>&lt;P&gt;Thank you, I will look into the data. I'm not sure what the issue is. Once again, thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2024 19:49:42 GMT</pubDate>
    <dc:creator>Jrpeterson2228</dc:creator>
    <dc:date>2024-08-21T19:49:42Z</dc:date>
    <item>
      <title>Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1524803#M10173</link>
      <description>&lt;P&gt;We have a Dashboard that helps the crews determine how many sites have been inspected for the calendar year and which sites remain that require a inspection for the calendar year. the first part of the expression (&lt;SPAN&gt;FIND INSPECTIONS FOR CURRENT YEAR)&lt;/SPAN&gt;, all up to the Console function works (console log picture), it identifies the sites, by unique identifier (FeatureIDN)&lt;SPAN&gt;&amp;nbsp;that have a recorded inspection for the calendar year.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;There seems to be something wrong or missing from the second part of the expression (&lt;SPAN&gt;FIND SITES THAT HAVEN'T BEEN INSPECTED), where it is supposed to compare CURRENT YEAR inspections and compare FeatureIDN of inspection and compare to the layer that has all the sites unique ID (IDN) and select the sites that have yet to be inspected.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I receive the following error: T&lt;SPAN&gt;est execution error: Cannot read properties of null (reading 'toString'). Verify test data.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I know that the console output is null, it just shows that the first part is working. I did not create the dashboard, my incumbent did, in 2022, it was brought to my attention about 2 weeks ago that it was not working (just the gauge and table that are linked to this data expression).&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Data Source Error.jpg" style="width: 526px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113034i11C91F461D4CB687/image-size/large?v=v2&amp;amp;px=999" role="button" title="Data Source Error.jpg" alt="Data Source Error.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I have recreated the dashboard in hopes to find an error somewhere, also to learn. For the life of me I cannot figure it out, any help will be welcome and very appreciated. I have also attached a picture of when the dashboard worked prior to taking the position. Thank you in advance! The data expression is as follows:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//our URL
var p= Portal("https://olympiawa.maps.arcgis.com");

//FIND INSPECTIONS FOR CURRENT YEAR (Table Data: swInspSystemSite)
//itemID:(e29449b0af064a5c9222d32e81c64fc1) and layer number found in web map properties (https://gis.olympiawa.gov/arcgis/rest/services/Secure/swSystemSiteInspectionsEditable/FeatureServer/24), information, source layer link
var tbleInsp = FeatureSetByPortalItem(p,'e29449b0af064a5c9222d32e81c64fc1', 24, ['FeatureIDN', 'created_date']);
var currentYear = Date(Year(Now()), 00, 01)
var filterInsps = "created_date &amp;gt;= @currentYear";
var insps = Filter(tbleInsp, filterInsps); 

var arrID = []; //[FeatureIDN, created_date]
var arrIndex = 0;
for (var i in insps) {
    arrID[arrIndex]= i.FeatureIDN
    ++arrIndex
}
Console(arrID)

////FIND SITES THAT HAVEN'T BEEN INSPECTED (Feature Layer Data: swSystemSite)
//itemID:(e29449b0af064a5c9222d32e81c64fc1)and layer number found in web map properties (https://gis.olympiawa.gov/arcgis/rest/services/Secure/swSystemSiteInspectionsEditable/FeatureServer/15), information, source layer link
var layerSites = FeatureSetByPortalItem(p, 'e29449b0af064a5c9222d32e81c64fc1', 15);
var filterSites = "IDN NOT IN @arrID AND SiteType &amp;lt;&amp;gt; 'pub'";
var sites = Filter(layerSites, filterSites);
return(sites)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 22:43:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1524803#M10173</guid>
      <dc:creator>Jrpeterson2228</dc:creator>
      <dc:date>2024-08-20T22:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525037#M10178</link>
      <description>&lt;P&gt;Since your data isn't public, do the fields "IDN" and "SiteType" exist in layerSites?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 13:12:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525037#M10178</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-08-21T13:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525138#M10180</link>
      <description>&lt;P&gt;Yes, they live in a feature service layer.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 15:11:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525138#M10180</guid>
      <dc:creator>Jrpeterson2228</dc:creator>
      <dc:date>2024-08-21T15:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525145#M10181</link>
      <description>&lt;P&gt;Have you checked whether layerSites is returning the correct layer?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 15:18:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525145#M10181</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-08-21T15:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525189#M10182</link>
      <description>&lt;P&gt;I apologize in advance, I a very new to this. I'm not sure I know if it returning the correct layer or not.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 16:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525189#M10182</guid>
      <dc:creator>Jrpeterson2228</dc:creator>
      <dc:date>2024-08-21T16:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525199#M10183</link>
      <description>&lt;P&gt;You can return the layer to make sure it's the correct one (and click Run in the upper left corner instead of Done in the lower right corner in the data expression editor)&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var layerSites = FeatureSetByPortalItem(p, 'e29449b0af064a5c9222d32e81c64fc1', 15);
return layerSites&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 16:09:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525199#M10183</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-08-21T16:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525201#M10184</link>
      <description>&lt;P&gt;It worked, thank you so much! Where or what do recommend for me to practice or learn more about Arcade? Once again, THANK YOU!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 16:15:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525201#M10184</guid>
      <dc:creator>Jrpeterson2228</dc:creator>
      <dc:date>2024-08-21T16:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525213#M10186</link>
      <description>&lt;P&gt;I'm not sure that solved your problem, since it's not returning the filtered data set. That was just to make sure that the dataset that is being returned is the one you're expecting. You still have to figure out why the filter isn't working (line 23)&lt;/P&gt;&lt;P&gt;You can start &lt;A href="https://developers.arcgis.com/arcade/" target="_self"&gt;here&lt;/A&gt; to learn about the fundamentals of Arcade. You can also view some &lt;A href="https://registration.esri.com/flow/esri/23uc/uc-2023-ps/page/proceedings?search=arcade" target="_self"&gt;technical sessions&lt;/A&gt; from last year's User Conference. I'm not sure if this year's sessions are available yet.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 16:27:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525213#M10186</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-08-21T16:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525226#M10187</link>
      <description>&lt;P&gt;You are correct, the filter is not working...&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 16:37:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525226#M10187</guid>
      <dc:creator>Jrpeterson2228</dc:creator>
      <dc:date>2024-08-21T16:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525329#M10188</link>
      <description>&lt;P&gt;Any suggestions on why the filter isn't working, or reference material I can use to troubleshoot? Thank you for helping.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 18:55:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525329#M10188</guid>
      <dc:creator>Jrpeterson2228</dc:creator>
      <dc:date>2024-08-21T18:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525345#M10189</link>
      <description>&lt;P&gt;I'm not sure why it's not working without looking at the data. The sql statement should work properly. That fact that it stopped working recently could mean there was a change to the underlying data, which is why I was asking if the layer is the correct one and if the fields are present in that layer.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 19:13:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525345#M10189</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-08-21T19:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525366#M10190</link>
      <description>&lt;P&gt;Thank you, I will look into the data. I'm not sure what the issue is. Once again, thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 19:49:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1525366#M10190</guid>
      <dc:creator>Jrpeterson2228</dc:creator>
      <dc:date>2024-08-21T19:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expression: expression for gauge stopped working (I did not write the expression), just trying to fix it with no Arcade experience.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1540025#M10296</link>
      <description>&lt;P&gt;Issue Solved: The related table, for some reason, had a null value in the FeatureIDN field. This was throwing the error when the expression was trying to execute line 22. I added a value into the table that was null, expression worked. Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 16:42:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-expression-for-gauge/m-p/1540025#M10296</guid>
      <dc:creator>Jrpeterson2228</dc:creator>
      <dc:date>2024-09-18T16:42:49Z</dc:date>
    </item>
  </channel>
</rss>

