Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Cisco Employee

How to use FOR loop in CPO

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
Cisco Employee

For each is to loop through a

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

Technical Leader, Services

shaurobe@cisco.com

66
Views
0
Helpful
1
Replies
CreatePlease to create content