Hi,
How can I add HAVING clausule to query in AX? I build query by QueryBuildDataSource by adding additional suming and grouping steatments but I need to filter resoult by checking value of sum. I make CustTransSplit table that splits custTrans record by goup of iitems, I want too check if values are the same, and filter this records that sum of splited are different that orginal record:
BR,
Tom
Hey Tom,
I was unable to find a specific method on QueryBuildDataSource of course as you probably didn't either. I did have a thought, though, that if you use the QueryBuildDataSource.autoSum() to add the aggregate column, you can then use that column in an emulator if statement that checks the value of that summed column to meet what might have been filtered in your hypothetical HAVING statement. Of course, this only works for a Count style aggregation. MIN or MAX would have to take another route.
Thanks,
Joel Engstrom
Microsoft ISV Partner Evangelist