<?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 Smart Form Calculation no longer working in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-smart-form-calculation-no-longer-working/m-p/1248122#M49774</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Arcade script that was used to auto-sequence the case number for a site and reset to 1 every year. This was working in a smart form less than a year ago. But now I get an error that my arguments for my Filter function have an invalid parameter. I tried adjusting the script to put my sql filter into its own variable then refer to it in the Filter function, but then I get an error message saying "parameter isn't a function". The code that was working before is below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was there an update in Arcade that affected the Filter function?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;//returns the current year
var timestam = Today()
var currentyear = Year(timestam)
 
//increment by 1 from highest number for only features within current year
var setfeatures = FeatureSetByName($map,"layer name",['CaseNumber','CaseYear'],false)
var numberlist = Filter(setfeatures, 'CaseYear=@currentyear')
var topnum = Top(OrderBy(numberlist,'CaseNumber DESC'),1)
var counter = Number(Max(topnum,'CaseNumber'))
var siteid = counter+1

return siteid&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2023 17:09:45 GMT</pubDate>
    <dc:creator>Caitlin_Todd_LCOR</dc:creator>
    <dc:date>2023-01-13T17:09:45Z</dc:date>
    <item>
      <title>Arcade Smart Form Calculation no longer working</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-smart-form-calculation-no-longer-working/m-p/1248122#M49774</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Arcade script that was used to auto-sequence the case number for a site and reset to 1 every year. This was working in a smart form less than a year ago. But now I get an error that my arguments for my Filter function have an invalid parameter. I tried adjusting the script to put my sql filter into its own variable then refer to it in the Filter function, but then I get an error message saying "parameter isn't a function". The code that was working before is below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was there an update in Arcade that affected the Filter function?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;//returns the current year
var timestam = Today()
var currentyear = Year(timestam)
 
//increment by 1 from highest number for only features within current year
var setfeatures = FeatureSetByName($map,"layer name",['CaseNumber','CaseYear'],false)
var numberlist = Filter(setfeatures, 'CaseYear=@currentyear')
var topnum = Top(OrderBy(numberlist,'CaseNumber DESC'),1)
var counter = Number(Max(topnum,'CaseNumber'))
var siteid = counter+1

return siteid&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 17:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-smart-form-calculation-no-longer-working/m-p/1248122#M49774</guid>
      <dc:creator>Caitlin_Todd_LCOR</dc:creator>
      <dc:date>2023-01-13T17:09:45Z</dc:date>
    </item>
  </channel>
</rss>

