Power Automate Item Function vs Items Function
Power Automate Item Function vs Items Function Posted by - Matthew Devaney on - January 26, 2025 5 Comments The Power Automate items functions returns the cu...
- Published
- Reading time
- 4 min read
Before you start
Is this guide for you?
- Best entry point
- Power Automate
- Time investment
- 4 min read
Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/power-automate-item-function-vs-items-function/. Author: Matthew Devaney.
Power Automate Item Function vs Items Function Posted by - Matthew Devaney on - January 26, 2025 5 Comments
The Power Automate items functions returns the current item in an apply to each loop or a do until loop. Whereas the item function refers to the current item in a repeating action such as the Filter Array action or the Select Action . The examples in this article will help to illustrate how they are used. Table of Contents
How Does The Power Automate Item Function Work?
Item Function Example #1: Filter An Array
Item Function Example #2: Select Columns From An Array
How Does The Power Automate Items Function Work?
Items Function Example# 1: Apply To Each Loop
How Does The Power Automate Item Function Work?
The Power Automate item function is useful in Data Operations actions such as the Filter action, the Select action , and the Join action. These actions iterate over an array and the item function allows us reference the current item. item()
A property name can be included after the item function to target a specific column in the array. item ()? [ 'columnName' ] Code language: CSS ( css )
Item Function Example #1: Filter An Array
The SharePoint list named Paid Time Off is used to track paid time off requests for a company. It has the following columns and data types: TimeOffDate – Date Only
RequestType – Choices [Personal, Vacation, Bereavemetn, Sick] Status – Single-line text EmployeePerson – Person
A Power Automate flow uses the Get Items action to obtain the Paid Time Off list items. The Filter action afterwards evaluates the SharePoint list items and returns only the items where Status equals Submitted .
An expression with the Power Automate item function is used on the left side of the comparison to target the Status column. item ()? [ 'Status' ] Code language: CSS ( css )
The array returned by the Filter action is this: TimeOffDate RequestType Status EmployeePerson 9/1/2020 Personal Submitted Kelly Smith 9/12/2020 Personal Submitted Sarah Green
Item Function Example #2: Select Columns From An Array
Another example using the same SharePoint list and the Select action evaulates the list items and returns only 2 columns of data.
The Date field is mapped to the TimeOffDate column using the Power Automate item function. item()?[TimeOffDate']
And the Type (choices) field is mapped to the RequestType column using the item function. item()?[RequestType ']?[' Value '] Code language: JavaScript ( javascript )
The output of the Select action is this array: Date Type 9/1/2020 Personal 9/4/2020 Vacation 9/5/2020 Bereavement 9/8/2020 Sick 9/12/2020 Personal 9/13/2020 Vacation 9/15/2020 Personal 9/18/2020 Personal
How Does The Power Automate Items Function Work?
The Power Automate items function can only be used inside of an Apply to Each loop. It is used to reference the current item in the loop. items( 'Apply_To_Each_Action_Name' ) Code language: JavaScript ( javascript )
A property name can be included after the items function to target a specific column in the current item.
items( 'Apply_To_Each_Action_Name' )?[ 'columnName' ] Code language: JavaScript ( javascript )
Items Function Example# 1: Apply To Each Loop
The SharePoint list Past Due Invoices is used to track unpaid invoices. Every day the invoices are not paid an additional late-fee of $10 is added to the amount.
A Power Automate flow uses the Get Items action to collect all of the unpaid invoices. Then an Apply To Each loop iterates over each invoice and an Update Item action increases the Amount by $10.
The ID of the Past Due Invoices list item to update is obtained by this expression.
items( 'Apply_to_each:_Past_Due_Invoice' )?[ 'ID' ] Code language: JavaScript ( javascript )
And the amount due is increased by writing this expression including the Power Automate items action.
add(items( 'Apply_to_each:_Past_Due_Invoice' )?[ 'Amount' ], 10 ) Code language: JavaScript ( javascript )
The resulting SharePoint list items with updated amounts look like this once the flow is run: Invoice Date Customer Amount 7/1/2024 ABC Company 10010 7/9/2024 DEF Limited 5010 7/24/2024 GHI Corporation 8010 8/7/2024 JLK Industries 3010 8/14/2024 MNO Partners 1010 Did You Enjoy This Article? 😺
Subscribe to get new Copilot Studio articles sent to your inbox each week for FREE Enter your email address Sign Me Up Questions?
If you have any questions or feedback about Power Automate Item Function vs Items Function please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion. Matthew Devaney Power Automate
Save Docusign Document To SharePoint With Power Automate
Tagged
Power Automate
Have a Microsoft 365 topic idea?
Share article suggestions, community session ideas, corrections, or real-world scenarios for future nextM365 learning notes.
Keep learning Microsoft 365
Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.
Continue learning
Related tutorials
Related questions
Related comparisons
Next action