Question

Another weird question, is it possible to specify an expression in a group by clause in X++? basically, how can I do the following:

while select InventDim **group by substr(InventDim.inventBatchId,1,3)**
join InventDimId from InventTrans
where InventTrans.inventDimId == Inventdim.inventDimId && InventTrans.ItemId == _itemId
{
MyQty += inventTrans.Qty
}

thanks for your help regards, Thomas

Was it helpful?

Solution

No, it's not possible - see Select Statement Syntax to understand what is allowed and what isn't. You have to use some workaround, typically to fetch data without grouping and process them by your application code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top