cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Unity
Helper I
Helper I

Prior date range expression help

Hi all,

 

I've created a workflow that performs a daily scan/ check of a SP List, specifically the column containing expiration dates. Each day the workflow checks the dates and if it matches the current date, a workflow triggers for that line item using this expression:

 

formatDateTime(utcnow(), 'yyyy-MM-dd')

 

I've got an issue with some users entering dates in the past (which still need actioning) and was wondering if I can get help with modifying my expression to have my workflow check the current date and all dates prior. I've got a second condition along with this to ensure it doesn't trigger on previous dates that have been actioned.

 

condition.PNG

 

TIA

1 ACCEPTED SOLUTION

Accepted Solutions
efialttes
Super User
Super User

Hi

Have you tried the following?

'End date' is lower or equal (lessOrEquals) than 'formatDateTime(utcnow(), 'yyyy-MM-dd')'

AND

'License' is not equal to 'Inactive'

 

'Less or equals' can be selected from the Condition Editor's combo

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

2 REPLIES 2
efialttes
Super User
Super User

Hi

Have you tried the following?

'End date' is lower or equal (lessOrEquals) than 'formatDateTime(utcnow(), 'yyyy-MM-dd')'

AND

'License' is not equal to 'Inactive'

 

'Less or equals' can be selected from the Condition Editor's combo

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @Unity ,

 

Do you have any issues now?

Please tell us more details about the issue you encountered.

When configuring the Condition, I recommend first determining whether the End Date is empty. You could configure the second condition in the first order.

Also, you need to make sure the format of the End Date is "yyyy-MM-dd".

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 Kudoed Authors
Users online (2,724)