cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ERKO_TECH_Nicol
New Member

How to get the Previous %CurrentItem%

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

2 ACCEPTED SOLUTIONS

Accepted Solutions
VJR
Super User
Super User

During the loop,

set a variable called prevItem as currentitem[Column Name]

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

View solution in original post

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.

View solution in original post

4 REPLIES 4
VJR
Super User
Super User

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
New Member

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 ?

 

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.

Perfect, Thanks a lot !

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,484)