Question
Service data manipulation from datashape.
I have a service takes infotable as an argument and gets some data in the form of a datashape infotable for a piechart which are just 2 counters "open" and "closed" being displayed on the pie chart.
This is the code for the service for a better understanding:
let result = DataShapes.ex_NumberWithLabel_DS.CreateValues();
let buckets = {
OPEN: 0,
CLOSED: 0
};
let localizationstate = Resources.RuntimeLocalizationFunctions.GetEffectiveToken({
token: "ex.mu.disposition.IssueState.CLOSED",
});
for (let i = 0; i < objectData.rows.length; i++) {
let row = objectData.rows[i];
if (row.workflowStatus == localizationstate) {
buckets.CLOSED++;
} else {
buckets.OPEN++;
}
}
result.AddRow({
label: "Open",
value1: buckets.OPEN,
DisplayField: Resources.RuntimeLocalizationFunctions.GetEffectiveToken({
token: "ex.mu.disposition.IssueState.OPEN",
}),
});
result.AddRow({
label: "Closed",
value1: buckets.CLOSED,
DisplayField: localizationstate,
});
The values of the datashape are:
Order Name Actions Additional Info Default Value
So what i want to do is that, I want to build another service which takes this services data and then i can manipulate the data as per my requirement and then supply it to the pie chart.

