cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
458
Views
0
Helpful
1
Replies

How to use FOR loop in CPO

esramasa
Cisco Employee
Cisco Employee

Hi All,

 

I want to use FOR each loop in CPO.

 

What is the syntax to use FOR each loop and how to capture outputs from FOR loop.

 

Like in what scenario we can use FOR each loop.

 

 

1 Reply 1

Shaun Roberts
Cisco Employee
Cisco Employee

For each is to loop through a table. So in basic code it is

 

for-each "row in table X" do:

 {

 

  //code here

 

}

 

You should use this when you need to iterate through a table of things and do something with each piece of data in that table.

 

 

--Shaun Roberts
Principal Engineer, CX
shaurobe@cisco.com