SUM_BYINDEX
Returns a number that represents the sum of a parents child records. Only the records within the Index argument will be included in the calculation.
SUM_BYINDEX ( <field_name>, Index [, <orderby field>] [, <filter_query>] )
- field_name: The name of the field used to calculate the Sum.
- index: The number of records to include in the calculation.
- orderby_field The field to sort the by.
- filter_query: A query string representing the domain of records to include.
Example: Create a field on the CUSTOMER table that gives the sum of first 3 products in Product Value order purchased by each customer.
SUM_BYINDEX( [PRODUCT.PRODUCT_VALUE], 3, PRODUCT.PRODUCT_VALUE])