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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,925)