Hello,
I am having some issues figuring out how the columns are ordered when doing a pivot table.
given the following (assume data repeats)
[
{
"TotalComm" : "Total Commission",
"AccountName" : object.Account.Name,
"OppName" : object.Name,
"RepName" : object.Sales_Rep_for_Split__r.Name,
"PaymentDate" : months[paymentDate1.getMonth()] + ' ' + paymentDate1.getFullYear(),
"PaymentAmount" : object.X1st_Payment_Secondary_Rep__c
}
]
If I have PaymentDate = February 2015, March 2015, June 2015, September 2015, and July 2016
My columns sort as February 2015, September 2015, March 2015, June 2015, and July 2016. The records in the array are in order from earliest month to latest month.
This is my init:
webix.ready(function(){
grida = webix.ui({
container:"testA",
view:"pivot",
height:800,
width:2000,
data:data,
fieldMap: { "OppName" : "Opportunity Name", "AccountName" : "Account Name", "RepName" : "Account Executive", "PaymentDate" : "Payment Date", "PaymentAmount" : "Payment Amount" },
structure: {
rows: ["TotalComm", "OppName", "AccountName", "RepName"],
columns: ["PaymentDate"],
values: [{ name:"PaymentAmount", operation:"sum" }],
filters:[]
},
ready:function(){
var grid = this.$$("data");
}
});
});
Any help would be greatly appreciated.
Thanks!
Tyler