web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get the Previou...
Power Automate
Answered

How to get the Previous %CurrentItem%

(0) ShareShare
ReportReport
Posted on by 19

Hello everyone,

 

I want to set an if condition in a for each loop with the previous currentitem than Power Automate Desktop did read in a Excel sheet.

In order to don't do an unnecessary action, because the data did not change.

 

For instance the if condition would be If currentitem[Colomn Name] <> previouscurrentitem[Colomn Name]

 

Thank in advance

Nicolas

  • Verified answer
    VJR Profile Picture
    7,635 on at

    During the loop,

    set a variable called prevItem as currentitem[Column Name]

    That way you can check If currentitem[Column Name] <> prevItem

  • ERKO_TECH_Nicol Profile Picture
    19 on at

    Thanks @VJR 

    But the variable will be update when its excetuded, so it has to be at the and of the loop, the if condition compare to the previous "Unupdated" Item ?

     

  • Verified answer
    VJR Profile Picture
    7,635 on at

    Yes @ERKO_TECH_Nicol , you can put it at the end of loop. I just mentioned "during" the loop. So you can put it where it suits your requirement.

  • ERKO_TECH_Nicol Profile Picture
    19 on at

    Perfect, Thanks a lot !

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard