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

Condition - check if current value is the same as the one on the next row

Hello,

 

I'm building a flow where I want to sent e-mails to dealers with servicing they need to plan for customers.

I get the data from an Excel-table with the 'List rows present in table' action.

 

Now in my condition I want to check if the current dealer is the same as the one on the next row.

If yes, I just want to store the data in an array to turn it into a HTML-table later.

If no, I want to store this data, send an e-mail and clear the array so I can start making a new table for the next dealer.

The If yes and If no trees of this flow I don't need help on, I already have that worked out.

 

Is there an expression in Power Automate where I can look over to the next row in my list and check that?

Because in the Condition-step, I can select the column 'Dealer' from the dynamic content and select 'equal to' but what do I put in the red box shown below?

 

Justin_Keijzer_0-1626441537815.png

 

I hope someone will be able to help me, would be appreciated.

2 REPLIES 2
ScottShearer
Super User
Super User

@Justin_Keijzer 

I suggest just adding a column to your table that references the value in the next row - that will make life simple.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Justin_Keijzer
New Member

@ScottShearer 

Thank you for the reply, but I am filtering the rows on date, because I have data from multiple months and only want the data two months away from the current month.


I will also use this kind of lookup for the license plate numbers in a next condition.

If the license plate is the same as the row before, I only want the service data to be displayed.

If it isn't the same I also want customer data to be displayed.

 

It sometimes happens that a single license plate has multiple service dates and so adding another column looking at the previous value won't work.

Because although the license plate is the same, the date is not and so I still want to display the customer data.

Justin_Keijzer_0-1626447077783.png

Here you can see with Veh. #1 there are two different dates.

For customer B, I only want to send Veh. #2 en #4 because #3 dates are from this months, so not two months away from now.

 

In the mean time if found the following: https://powerusers.microsoft.com/t5/General-Power-Automate/how-to-peek-at-next-item-in-an-apply-to-a...

But this doesn't seem to work for me

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,202)