Hello,
Not a developer and find it hard to work this out.
I have this code:
queryTask.execute(query, lang.hitch(this, function(results) {
DataReport = array.map(results.features, function (feature) {
Data= [feature.attributes["PLANNEDORCOMPLETED"],feature.attributes["AREAHA"],feature.attributes["ACTIVITYTYPE"],];
dataReport2.push(Data);
});
}));
feature.attributes["PLANNEDORCOMPLETED"] - is a field with coded domain, so my output looks like 1,2,3,1,2,3 (these are the values of the domain, see screenshot below). I can't work out how to replace numbers with actual descriptive values of the domain names.
I am not necessary need to connect back to the dataset, even if I can add somewhere in my code:
if 1, use "tomato, if 2, use "potato", etc. Not sure how and where...
I also would like to add an extra row at the end to populate the sum of all numbers. I got the value for the sum but don't know how to add extra line in the Data variable.
Any help greatly appreciated!

