Hi,
Using query classes you can do that.
e.g.
q = new Query();
ds = q.addDataSource(tablenum(projInvoiceEmpl));
ds.addSelectionField(fieldnum(projInvoiceEmpl,qty),SelectionField::Sum);
ds.addSortField(*fieldnum(projInvoiceEmpl,categoryid)*);
ds.orderMode(OrderMode::GroupBy);
Hi All,
I would like to group and sum by fields dynamically in an AX while statement.
Basically I want to sum and group by any field on the table using a setup
table. Example:
while select sum(qty) from projinvoiceempl
group by CategoryID
{
//Some code which does some stuff with the qty sum
}
2 matches
Mail list logo