cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BenjaminSTRIEBI
Level: Powered On

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
BenjaminSTRIEBI
Level: Powered On

Re: Compare dates - Flow - Sharepoint List of elements

I've find : 

 

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

 

4 REPLIES 4
BenjaminSTRIEBI
Level: Powered On

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.

BenjaminSTRIEBI
Level: Powered On

Re: Compare dates - Flow - Sharepoint List of elements

I've find : 

Spoiler
@lessOrEquals(formatDateTime(item()?['DateTest'], 'dd/MM/yyyy'), formatDateTime(utcNow(), 'dd/MM/yyyy'))
BenjaminSTRIEBI
Level: Powered On

Re: Compare dates - Flow - Sharepoint List of elements

I've find : 

 

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

 

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

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 243 members 4,706 guests
Please welcome our newest community members: