Hi,
I am very new to Arcade (which you probably be able to tell by my filter expressions below).
I am attempting to create a Data Expression that can be used to power an Indicator widget in a Dashboard. I have built and tested this in the Data Expression builder within my Dashboard and when I click "test" it returns the proper result. I click done, but then see a little triangle with an ! telling me "Unable to execute Arcade script".
Why would I see this message? My Arcade script is below. Any help would be appreciated.
var p = 'https://www.arcgis.com';
var itemID_CMpts = 'xyz';
var layerID_CMpts = 0;
var fs1 = FeatureSetByPortalItem(Portal(p), itemID_CMpts, layerID_CMpts, ['Point_Status', 'EQ_File_Number'], false);
var filterCMpts = Filter(fs1, "Point_Status ='Unstable' AND EQ_File_Number ='EQ2015-078' OR Point_Status ='Unstable' AND EQ_File_Number = 'Eq2013-026' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2018-082' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2018-052' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2001-080X' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2003-021' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ1989-015' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2002-023' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2002-045X' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2019-110' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2020-017' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2019-091' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2018-029' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2020-033' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2019-036' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2020-052' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2019-064' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2017-040' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2020-031' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2021-003' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2011-016' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2017-026' OR Point_Status ='Unstable' AND EQ_File_Number = 'EQ2021-020'");
var itemID_join = 'xyz';
var layerID_join = 0;
var fs2 = FeatureSetByPortalItem(Portal(p), itemID_join, layerID_join, ['Point_Status_revisit', 'EQ_File_Number'], false);
var filterJoin = Filter(fs2, "Point_Status_revisit ='Stable' AND EQ_File_Number ='EQ2015-078' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'Eq2013-026' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2018-082' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2018-052' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2001-080X' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2003-021' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ1989-015' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2002-023' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2002-045X' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2019-110' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2020-017' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2019-091' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2018-029' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2020-033' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2019-036' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2020-052' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2019-064' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2017-040' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2020-031' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2021-003' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2011-016' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2017-026' OR Point_Status_revisit ='Stable' AND EQ_File_Number = 'EQ2021-020'");
var CntCMpts = Count(filterCMpts)
var CntJoin = Count(filterJoin)
return CntCMpts - CntJoin
Thank you!