Initializing help system before first use

# vdl-action-aggregate

Aggregate data as an array of numbers, or an array of objects that contain a "value" property

since 4.8

### Required parent element

Must be contained within one of the following elements:

- <vdl-action-group>

### Example

    <vdl-action-group name="aggregateArray">
      <vdl-action-aggregate data="=[100, 200, 300]" operation="sum"></vdl-action-aggregate>
      <!-- will return: 600 -->
    </vdl-action-group>

    <vdl-action-group name="aggregateObjects">
      <vdl-action-aggregate data="=[{key:['a'], value:100},{key:['b'], value:200}, {key:['c'], value:300} ]" operation="sum"></vdl-action-aggregate>
      <!-- will return: 600 -->
    </vdl-action-group>

    <vdl-action-group name="aggregateGroupedArrays">
      <vdl-action-aggregate preserve-data="true" data="=[
           { key: 'a', values: [100, 200, 300] },
           { key: 'b', values: [101, 201, 301] },
           { key: 'c', values: [102, 102, 102] }
     ]" operation="sum"></vdl-action-aggregate>
      <!-- will return: [
           { key: 'a', values: [100, 200, 300], value: 600 },
           { key: 'b', values: [101, 201, 301], value: 603 },
           { key: 'c', values: [102, 102, 102], value: 606 }
       ] -->
    </vdl-action-group>

    <vdl-action-group name="aggregateGroupedObjects">
      <vdl-action-aggregate data="=[
           { key: 'a', values: [{key:['a'], value:100}] },
           { key: 'b', values: [{key:['b'], value:200}] },
           { key: 'c', values: [{key:['c'], value:300}] }
     ]" operation="sum"></vdl-action-aggregate>
      <!-- will return: [
           { key: 'a', value: 100 },
           { key: 'b', value: 200 },
           { key: 'c', value: 300 }
       ] -->
    </vdl-action-group><vdl-action-group name="customAggregation">
      <vdl-action-aggregate data="=[100, 200, 300]" custom-operation="=myFunction"></vdl-action-aggregate>
    </vdl-action-group>

### Attributes

custom-operation | Custom Aggregation operation to perform on the data. Will be triggered with data and preserve-data attributes | since 4.8 | accepts expression |
data | The data which is to be aggregated. Supported formats are; array of numbers: [1,2,3], Array of objects containing a value property: [{... value: 1}], or an array of objects that contain a values property: [{... values:[1,2,3]}] or [{values:[{... value: 1}]}]. If the data attribute is not set then the current value passed by the previous VDL Action or VDL action group will be used to supply the data. | since 4.8 | accepts expression |
operation | Built in aggregation operation to perform on the data. Available aggregators avg, count, max, min, sum | since 4.8 | accepts expression |
preserve-data | When aggregating a grouped object, the default behaviour is to dispose of the pre-aggregated values array. Set this to true to retain the pre-aggregated values property (when aggregating grouped data only). | since 4.8 |  |

Parent Topic VDL 5 Reference

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.