ForEach

When we have multiple nodes and want to execute the same operation for each of the node, we will use the ForEach function. It is not applicable for performing operation to a single node.

Syntax

ForEach (Array,Iterator)

Arguments

Example

Consider the below scenario where we have Revenue and cost items for different regions. Our objective is to calculate the total costs incurred for marketing.

To achieve this, the following formula should be written in the [US Marketing] node,

SUM(FOREACH(THIS.CHILDREN,FOREACH(THIS.CHILDREN.THIS,THIS.CHILDREN.GET(2).CHILDREN.GET(1))))

Explanation

Last updated