Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

For Each

Use this command to iterate through the values in a list variable.

Copy

Syntax

FOR EACH VariableName1 IN VariableName2... NEXT                    

where:

  • VariableName1 is the name of a variable that has not yet been declared and whose type is based on VariableName2.
  • VariableName2 is the name of a list variable.
Copy

Syntax example

CREATE VARIABLE ItemList[] AS STRING
SET VARIABLE ItemList = CreateList("Users")
FOR EACH Item IN ItemList
<commands to execute>
NEXT                                                                

Published:

For Each

Use this command to iterate through the values in a list variable.

Copy

Syntax

FOR EACH VariableName1 IN VariableName2... NEXT                    

where:

  • VariableName1 is the name of a variable that has not yet been declared and whose type is based on VariableName2.
  • VariableName2 is the name of a list variable.
Copy

Syntax example

CREATE VARIABLE ItemList[] AS STRING
SET VARIABLE ItemList = CreateList("Users")
FOR EACH Item IN ItemList
<commands to execute>
NEXT                                                                

For an optimal Community experience, Please view on Desktop