How to get the length of an Array/List in Integration procedure using Loop Block?
Suppose you have a List and want to get the length of the list to perform further actions, you can do that using Loop Block in Integration…
How to get the length of an Array/List in Integration procedure using Loop Block?
Suppose you have a List and want to get the length of the list to perform further actions, you can do that using Loop Block in Integration Procedure (Salesforce Vlocity).

Assume you have an input List like given below
{
"List": [
{
"name": "Apple",
"type":"Fruit"
},
{
"name": "Orange",
"type": "Fruit"
},
{
"name": "Potato",
"type": "Vegetable"
}
]
}
The length of the List here in this example is 3.
You can calculate that by following the below steps.
- Drag and add a Loop Block into your IP
- Drag and add a SetValue into your IP inside the LoopBlock
- Give the name of your List node in the Loop block in the field “Loop List”. In our example, the list node is “List”.

-
In your setvalues, give any element name (eg: “temp”) and value as “=%count%+1”.
-
Put the element name (“temp”) from your setvalues in the response JSON path and put “count” in the response JSON node of the same setvalues. This will make the setvalues to iterate and increment the “temp” by 1 on each iteration and return as “count”.

- You will now get the length of your list under the node “count”.
메타데이터
- post_id
- e658bfee6190
- slug
- how-to-get-the-length-of-an-array-list-in-integration-procedure-using-loop-block-e658bfee6190
- url
- https://medium.com/@johanissac_27372/how-to-get-the-length-of-an-array-list-in-integration-procedure-using-loop-block-e658bfee6190
- canonical_url
- https://medium.com/@johanissac_27372/how-to-get-the-length-of-an-array-list-in-integration-procedure-using-loop-block-e658bfee6190
- author_url
- https://medium.com/@johanissac_27372
- status
- ok
- fetched_at
- 2026-08-07 02:12:00