Skip to main content

For Each

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

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.

Syntax example:

CREATE VARIABLE ItemList[] AS STRING

SET VARIABLE ItemList = CreateList("Users")

FOR EACH Item IN ItemList

<commands to execute>

NEXT

Was this article helpful?

We're sorry to hear that.