Hi Sir Alexander.
I have this filter in v5. How can I format this in v6 please?
function spjs_getFilterValue(list,field){
var q = "<Where><IsNotNull><FieldRef Name='ID' /></IsNotNull></Where><OrderBy><FieldRef Name='"+field+"' Ascending='FALSE' /></OrderBy>";
var res = spjs.charts.qItems({"listName":list,"query":q,"viewFields":[field]});
var b = [];
var fObj = {};
$.each(res.items,function(i,item){
if(fObj[item[field]] === undefined){
fObj[item[field]] = 1;
if(item[field].split(";#").length > 1){
item[field] = item[field].split(";#")[1];
}
b.push({"f":""+item[field]+"","v":""+item[field]});
}
});
return b;
}
var myCustomFilterOptions = spjs_getFilterValue("{387E5BB7-EE04-4496-8B77-186EE736321B}","Month");
Thank you very much.
-
This topic was modified 8 years ago by Jhap.