I made some new data view and charts stuff, now all of a sudden tables that once worked fine show an error:
Evaluation Error: TypeError: i.push is not a function
at l$1.diffed (plugin:dataview:15978:1539)
at j$2 (plugin:dataview:15976:6418)
at w$2 (plugin:dataview:15976:2236)
at j$2 (plugin:dataview:15976:6192)
at w$2 (plugin:dataview:15976:2236)
at L$1 (plugin:dataview:15976:7442)
at j$2 (plugin:dataview:15976:6377)
at w$2 (plugin:dataview:15976:2236)
at L$1 (plugin:dataview:15976:7442)
at j$2 (plugin:dataview:15976:6377)
Here’s the query that show’s this error:
dataviewjs
let OutcomeCount = (dv.pages('"00_Trades"').where(p => p.play == "D_Scenario").length);
let outcomesum = 0;
for(let i = 0; i < dv.pages('"00_Trades"').where(p => p.play == "D_Scenario").length; i++) {
if(dv.pages('"00_Trades"').where(p => p.play == "D_Scenario")[i].outcome) {
outcomesum += dv.pages('"00_Trades"').where(p => p.play == "D_Scenario")[i].outcome;
}
}
dv.paragraph("# Total Profit: " + outcomesum + " R")
Funny thing is … it’s only affecting creating tables … does anyone have an idea?