="+t0.getTime()+ " and"+ " createdDate<"+t1.getTime()+ " ]"; var count; var size; var count=com.mendix.core.Core.retrieveXPathQueryAggregate( root.getContext(), "COUNT("+ query+ ")" ); I’m a bit unsure about SUM/AVERAGE/ETC however, it seems to deliver results that do not seem correct var op="SUM";//AVERAGE/ETC var query= " //"+table+"/"+attribute+ " ["+ " createdDate>="+t0.getTime()+ " and"+ " createdDate<"+t1.getTime()+ " ]"; var count; var size; var count=com.mendix.core.Core.retrieveXPathQueryAggregate( root.getContext(), op+"("+ query+ ")" );  "> ="+t0.getTime()+ " and"+ " createdDate<"+t1.getTime()+ " ]"; var count; var size; var count=com.mendix.core.Core.retrieveXPathQueryAggregate( root.getContext(), "COUNT("+ query+ ")" ); I’m a bit unsure about SUM/AVERAGE/ETC however, it seems to deliver results that do not seem correct var op="SUM";//AVERAGE/ETC var query= " //"+table+"/"+attribute+ " ["+ " createdDate>="+t0.getTime()+ " and"+ " createdDate<"+t1.getTime()+ " ]"; var count; var size; var count=com.mendix.core.Core.retrieveXPathQueryAggregate( root.getContext(), op+"("+ query+ ")" );  "> ="+t0.getTime()+ " and"+ " createdDate<"+t1.getTime()+ " ]"; var count; var size; var count=com.mendix.core.Core.retrieveXPathQueryAggregate( root.getContext(), "COUNT("+ query+ ")" ); I’m a bit unsure about SUM/AVERAGE/ETC however, it seems to deliver results that do not seem correct var op="SUM";//AVERAGE/ETC var query= " //"+table+"/"+attribute+ " ["+ " createdDate>="+t0.getTime()+ " and"+ " createdDate<"+t1.getTime()+ " ]"; var count; var size; var count=com.mendix.core.Core.retrieveXPathQueryAggregate( root.getContext(), op+"("+ query+ ")" );  ">
com.mendix.core.Core.retrieveXPathQueryAggregate: SUM/AVERAGE - Mendix Forum

com.mendix.core.Core.retrieveXPathQueryAggregate: SUM/AVERAGE

0

Hello again

I know how to do COUNT

var query=
        "   //"+table+
        "   ["+
        "       createdDate>="+t0.getTime()+
        "       and"+
        "       createdDate<"+t1.getTime()+
        "   ]";
var count;
var size;
var count=com.mendix.core.Core.retrieveXPathQueryAggregate(
    root.getContext(),
    "COUNT("+
    query+
    ")"
);

I’m a bit unsure about SUM/AVERAGE/ETC however, it seems to deliver results that do not seem correct

var op="SUM";//AVERAGE/ETC
var query=
        "   //"+table+"/"+attribute+
        "   ["+
        "       createdDate>="+t0.getTime()+
        "       and"+
        "       createdDate<"+t1.getTime()+
        "   ]";
var count;
var size;
var count=com.mendix.core.Core.retrieveXPathQueryAggregate(
    root.getContext(),
    op+"("+
    query+
    ")"
);

 

asked
0 answers