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

オフライン
Ho do we implement the "GroupBy" and "Max" in AML?  
Parents
  • 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
Reply
  • 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
Children
No Data