Updated: 07 December 2022
In this post, I aim to provide a clear explanation of the item() and items() functions in Power Automate. By the end of this post, you will have a deeper understanding of these functions and be able to utilise them effectively in your workflows.
- Example 1: item() and items() can refer to the same element in an array
- Example 2: item() gives you the context
- Example 3: Filter Array action – item() gives you the context
- Example 4: items() function SHOWS the context
- item() function must not have any parameters
- Use the following syntax example for the item() function
- Further reading
Example 1: item()
and items()
can refer to the same element in an array
The item() and items() function is used to get the value of the current item as shown below.
The following example initialises an array of fruit names:

Then loop over (iterate) each of the items in the array using the Apply to each loop.
Compose actions are used to show the values of item()
and items('Apply_to_each')
:

Note how the expressions item()
and items('Apply_to_each')
refer to the same element in the array:

Example 2: item()
gives you the context
The following example initialises an array of fruit names and an array of department names:

Note the two uses of the item()
expression below:
- The context of
item()
in the compose action is the varFruit variable of the Apply to Each loop
- The context of
item()
in the Filter Array action is the varDepartments variable of the Filter Array action

Example 3: Filter Array action – item()
gives you the context
Note the two uses of the item()
expression below:
- The context of
item()
in the Filter Array action is the varFruit variable
- The context of
item()
in the Filter Array 2 action is the varDepartments variable

Sample runtime output of the Filter Array actions:

Example 4: items()
function SHOWS the context
In the example flow below note how the items()
function shows the context:
- the context of
items('Apply_to_each')
is the Apply to Each loop - the context of
items('Apply_to_each_2')
is the Apply to Each 2 loop


When using nested apply to each loops – see the example above on how to reference an item in the outer loops.
item()
function must not have any parameters

Use the following syntax example for the item()
function

Leave a Reply