How to Implement "GroupBy" and "Max()" in AML?

オフライン
Ho do we implement the "GroupBy" and "Max" in AML?  
  • Hi, You would have different options:
    • either you write your query in SQL and use the ApplySQL SOAP action
    or
    • you define a specific method "aggregation" which will look for an "aggregate_mode" attribute
    • In this method you will run a get query based on the provided information
    • And you will aggregate the result in c# based on the aggregate_mode you selected.
    • Then you just have to call your method in AML:
    <Item action="aggregate" type="part" aggregate_mode="max" aggregate_criteria="cost"> <make_buy>1</make_buy> </Item> It's just an idea
  • Thanks for the tip.  I think it makes more sense to use the "aggregate" action. Can you point me to the right documentation that provides more details on the functionality of "aggregate" action. I dont find details of it in the programmer guide.
  • Former Member
    Former Member
    Speedriser, You would have to create it yourself, it is not available out of the box.