reduceObjectsList
A Workflow Engine function that reduces a list of objects into single object of merged key value pairs.
This function is available as a feature of the Add-ons v2.3 download and later.
This function is available for event, alert, and Situation workflows.
The workflow sweep up filter applies to this function.
Back to Workflow Engine Functions Reference.
Arguments
Workflow Engine function reduceObjectsList
takes the following arguments:
Name | Required | Type | Description |
---|---|---|---|
| yes | string | Field name to reduce from either a custom_info field or workflowContext field |
Example
The following example demonstrates typical use of Workflow Engine function reduceObjectsList
.
This function reduces a field custom_info.enrichment.RESTEndpoint1 contains a list of objects from:
[ { "applications": [ "Quoting & Pricing" ], "services": [ "Pricing" ], "environment": "Production", "manufacturername": "Stuben Inc.", "category": "Hardware", "region": "United States / Arizona", "location": { "site": "Phoenix", "building": { "name": "PHX4701B", "room": "AZ PDC1 - 116, Main", "floor": "1" } } }, { "applications": [ "Search & Indexing" ], "services": [ "Search" ], "environment": "Production", "manufacturername": "Stuben Inc.", "category": "Hardware", "region": "United States / Arizona", "location": { "site": "Phoenix", "building": { "name": "PHX4701B", "room": "AZ PDC1 - 116, Main", "floor": "1" } } } ]
to:
{ "applications": [ "Quoting & Pricing", "Search & Indexing" ], "services": [ "Pricing", "Search" ], "environment": "Production", "manufacturername": "Stuben Inc.", "category": "Hardware", "region": "United States / Arizona", "location": { "site": "Phoenix", "building": { "name": "PHX4701B", "room": "AZ PDC1 - 116, Main", "floor": "1" } } }