I have the Arcade code (below) in a data expression for an Indicator element. When I test it, it returns the correct value, but in the Data Expressions selection list the expression name is grayed out and has a warning icon stating 'Unable to execute Arcade Script'. Very helpful.
Any idea what the error is and how to fix it? Thanks!
var p = Portal('https://myPortal/')
var fs = FeatureSetByPortalItem(
p,
'7hk90262c6e641c6bc9513da29fdf346',
0,
[
'sample_id_dup',
'sample_id_pre',
'sample_id_post',
'sample_id_other_1',
'sample_id_other_2',
],
false
);
var dup = Count(Filter(fs, 'sample_id_dup IS NOT NULL'));
var pre = Count(Filter(fs, 'sample_id_pre IS NOT NULL'));
var post = Count(Filter(fs, 'sample_id_post IS NOT NULL'));
var other1 = Count(Filter(fs, 'sample_id_other_1 IS NOT NULL'));
var other2 = Count(Filter(fs, 'sample_id_other_2 IS NOT NULL'));
return dup + pre + post + other1 + other2;