Loop Embedded Objects
You can use Loop embedded objects to obtain data from the For Each node.
Property
Property |
Type |
Description |
Example |
---|---|---|---|
dataArray |
String |
Loop.dataArray indicates the two-dimensional array defined in the dataset of the For Each node. Generally, the format is #{Loop.dataArray[0][0]} or #{Loop.dataArray[0][1]}. [0][0] indicates the first value in the first row of the array, and [0][1] indicates the second value in the first row, and so on. |
The value of Subjob Parameter for the For Each node indicates that the first value in the second row of the two-dimensional array in the dataset is always used in the For Each loop. #{Loop.dataArray[1][0]} |
current |
String |
For Each nodes process data in a dataset by row. Loop.current indicates a row of a two-dimensional array defined in the dataset of the For Each node. This row is a one-dimensional array. Generally, the format is similar to #{Loop.current[0]}, #{Loop.current[1]}, or others. [0] indicates the first value in the current row, [1] indicates the second value in the current row, and so on. |
The value of Subjob Parameter for the For Each node indicates that the second value in the traversed row of the two-dimensional array in the dataset is always used in the loop traversal of the For Each node. #{Loop.current[1]} |
offset |
Int |
Current offset of the For Each node, starting from 0. Loop.dataArray[Loop.offset] = Loop.current. |
Obtain the current offset of the For Each loop, that is, the number of traversals, starting from 0. #{Loop.offset} |
Example
To obtain the second value of a row that is being processed, use the following EL expression:
#{Loop.current[1]}
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot