cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Compare dates - Flow - Sharepoint List of elements

Hello Man Happy,

 

I am a new SharePoint and Flow user. My goal is to transfer expired contracts to a list.
To do this, I use two identical lists: [Title][DateTest].
So I created a workflow but the condition doesn't work.
The condition must cause any contract whose TestDate has expired to be transferred.

 

@lessOrEquals(triggerBody()?['DateTest'], formatDateTime(utcnow(), 'dd-MM-yyyy'))

For the moment, all items in list 1 are copied to list 2...Man Frustrated

 

Sorry if I spell it wrong, I'm French. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Compare dates - Flow - Sharepoint List of elements

I've find : 

 

Spoiler
@lessOrEquals(formatDateTime(item()?['DateTest'], 'dd/MM/yyyy'), formatDateTime(utcNow(), 'dd/MM/yyyy'))

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Compare dates - Flow - Sharepoint List of elements

Hello everybody Smiley Happy,

 

I'm new to sharepoint and Flow and I want to transfer old contracts from list 1 to list 2 when they are out of date; so when DateTest is past or today

I have two lists that have same columns  [Title] [DateTest].

 

This is my IF condition

 

@lessOrEquals(triggerBody()?['DateTest'], formatDateTime(utcnow(), 'dd-MM-yyyy'))

 

The problem is that at each execution of the workflow, all the lines of the list1 are sent in the list 2

 

Please, excuse me for my poor English, i'm french.

Anonymous
Not applicable

Re: Compare dates - Flow - Sharepoint List of elements

I've find : 

Spoiler
@lessOrEquals(formatDateTime(item()?['DateTest'], 'dd/MM/yyyy'), formatDateTime(utcNow(), 'dd/MM/yyyy'))
Anonymous
Not applicable

Re: Compare dates - Flow - Sharepoint List of elements

I've find : 

 

Spoiler
@lessOrEquals(formatDateTime(item()?['DateTest'], 'dd/MM/yyyy'), formatDateTime(utcNow(), 'dd/MM/yyyy'))

 

View solution in original post

CHF
Level: Powered On

Re: Compare dates - Flow - Sharepoint List of elements

Hi

 

Thanks for helping me with this, i had a similar requirement. Your code did not work for me because of my triger however it put me on the right path, than you.  here is my code:

@lessOrEquals(formatDateTime(triggerBody()?['Deadline'], 'dd/MM/yyyy'), formatDateTime(utcNow(), 'dd/MM/yyyy'))

and my flow looks like: 

Capture1.PNG

 

Regards

 

Tyrone

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

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