Tag Link | [List->ForEach] | Category | Array |
---|---|---|---|
Type | Member | Source Available | No |
Support | Preferred | Version | 8.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0 |
[List->ForEach] invokes a tag, type, or compound expression on each element in the list. The tag requires a single parameter which is a tag reference, data type instance, or compound expression. The parameter is invoked on each element of the list in turn (i.e. the tag is called with each element of the list as a parameter in turn). The parameter must return True for the tag to continue. If the parameter returns False then the operation is halted.
The parameter can modify the list by modifying the list element which is passed into it by reference.
[Var: 'list' = (List: 1, 2, 3, 4)]
[Define_Tag: 'Ex_Square',
[#value *= #value]
[Return: True]
[/Define_Tag]
[$list->(ForEach: Ex_Square)]
Required Parameters | |
---|---|
Tag | A tag reference, data type, or compound data type. This parameter will be applied to each element of the list in turn |
See the Lasso 8 Language Guide for examples of how to use this tag.