Several arcade expressions used in Dashboards have stopped working.
Getting the error: "Test execution error: Unknown error. Verify test data."
Had no problems before the update, anyone else having this issue? Could the new date functions (DateOnly etc.) be the cause?
Appreciate if anyone can help.
Below is of my expressions that have stopped working:
var fs = FeatureSetByPortalItem(Portal('https://www.arcgis.com'), '[feature layer id]' , 0, ['CreationDate','WeightKg'], false); var DateDict = {'fields': [{ 'name': 'Date', 'type': 'esriFieldTypeDate'},
{'name': 'Weight', 'type': 'esriFieldTypeDouble'}],
'geometryType': '', 'features': []};
// start variable for unix calculation
var start = ToLocal(Date(1970, 0, 01, 0, 0, 0, 0))
// variable for today, used to filtered averages < today
var t = DateDiff(Date(Year(today()),Month(today()),Day(today()),0,0,0,0),start, 'milliseconds')
for (var f in fs){
var new_f = {'attributes':{'Date':DateDiff(
Date(Year(f['CreationDate']),
Month(f['CreationDate']),
Day(f['CreationDate']),
0,
0,
0,
0)
,start, 'milliseconds'),
'Weight':f['WeightKg']}}
Push(DateDict.features, new_f)}
var fs_gb = GroupBy(featureset(text(DateDict)), "Date", { name: 'TodayWeightSum', expression: 'Weight', statistic: 'SUM' });
console(t)
return filter(fs_gb, 'Date = @t')