webCOMAND

#EACH

Processes and outputs cScript between #EACH() and #ENDEACH for each item in a collection, making the item available as a named variable.

Syntax

#EACH(Collection as Item) ... #ENDEACH

Parameters

  • Collection - A collection variable to iterate over it's items.
  • Item - Variable to assign to the item in the collection that corresponds to the current iteration.

Example

#/ List events from a Publication List with the Identifier "Events"
#EACH($Events as $Event)
${Event.Date} - ${Event.Description}
#ENDEACH

See Also

#LIST, #FOR, #CQL, #CPATH, #SQL