Action: Loop: apply to each

Action: Loop: apply to each

Loop: apply to each action executes a block of actions for each item in the iterating array.

Exampleof Loop: apply to each action configuration with SharePoint list items

Ein Bild, das Text, Screenshot, Zahl, Software enthält.

KI-generierte Inhalte können fehlerhaft sein.

For more information about Action Builder read Action Builder introduction article.

To configure the action Loop: apply to each additional property should be specified:

Configuration

Property

Required

Type

Description

Iterating array

yes

Array

Need to specify an array or select an output from previous actions.

This can be the output of a Get items action, a variable having an array, a multi lookup field, a multi choice field or just an array directly calculated in this property.

 

Availability

Modern Forms

List Actions

Scheduled/Triggered Actions

 

Output

Output Parameter

Type

Description

CurrentItem

Object

Returns an element from the iterating array 

Index

Number

Returns an iteration number of element

Count

Number

Returns total iterations number

Note: Outputs available for actions inside Loop: apply to each action

Ein Bild, das Text, Screenshot, Software, Display enthält.

KI-generierte Inhalte können fehlerhaft sein.

Examples:

Loop: apply to each action is usually used with action get items. In this case, since CurrentItem output from the Loop: apply to each action is an object representing an element from the iterated array, you need to specify a property to extract its value:

[[@Actions.Loop_apply_to_each.CurrentItem]].ID

Ein Bild, das Text, Screenshot, Zahl, Software enthält.

KI-generierte Inhalte können fehlerhaft sein.

To retrieve all available properties, you can turn on Debug mode in Action builder, then open Console tab in developer tools (F12) in the SharePoint site and execute Get items action.

 

This is an example of using multi person field. With the same format, you can also use multi lookup, multi choice or simply an array.

Ein Bild, das Text, Screenshot, Zahl, Schrift enthält.

KI-generierte Inhalte können fehlerhaft sein.