cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sherif77
Helper II
Helper II

UTCNOW () expression is not working

Hi All,

My flow is not working. please help..

I have a lot of certficates that i'm trying to make a flow to remind me with it.

I started with schedule then connector Excel -> Get rows -> then my condition was like that 

UTCNoW() '  is equal to '  the coulmn of expiry date in my excel sheet.

 

Appreciating your sooonest advice..Flow.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @sherif77 ,

 

This seems to be different from the configuration in the screenshots I have provided to you.

Instead of configuring Apply to each in the Condition, please configure Condition in Apply to each.

Because the expression in Condition is configured based on Apply to each.

Please take a try again.

 

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.

View solution in original post

9 REPLIES 9
Harry_G
Kudo Kingpin
Kudo Kingpin

Hi @sherif77 ,

Did you check your date format kindly format your utcNow() and expirey date to same format. please see below image for convert it to same format.

Capture.JPG

 

Kindly convert your expiray date by using same pattern.

If this Answer is helpful,  Kindly Accept it as a Solution.

 

Thanks,

Harry_G

 

Dear Harry,

 

is not working as well, any further recomendations

 

Capture.PNG

Hi @sherif77 ,

 

Could you provide the exact format/name and type of expiry date field?

Please try the following method to configure your Flow:

The values of utcNow() and expiry date fields are converted to the same format using the formatDateTime() function for comparison.

Note: Field values are generally referenced using items('Apply_to_each')['ColumnName'], but if the field name contains spaces, you will need to use _x0020_ instead of spaces.

Like: items('Apply_to_each')['Renew_x0020_Date']

Expression reference:

utcNow('yyyy-MM-dd')

is equal to

formatDateTime(items('Apply_to_each')['Renew_x0020_Date'],'yyyy-MM-dd')

Image reference:

13.PNG12.PNG

But it's worth noting that if the value of expiry date output in Flow is number, we need to consider using other methods.

If your situation is the same as what I described, please let me know, I will provide another example.

 

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.

Dear Barry,

I did every single step you have explained I'm receiving this error

The template validation failed: 'The inputs of template action 'Condition' at line '1 and column '1693' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Condition' to be referenced by 'repeatItems' or 'items' functions.'.

Any advce.

Regrards,

 

Sherif

Hi @sherif77 ,

 

Could you share all the screenshots of the Flow configuration?

The result of my test here is no problem, I have no way to reproduce a similar error.

Please provide more details.

 

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.

Hello Barry,

 

here you there the Screenshot requested hopefully this could work.

 

 

 

Flow.PNG

Hi @sherif77 ,

 

This seems to be different from the configuration in the screenshots I have provided to you.

Instead of configuring Apply to each in the Condition, please configure Condition in Apply to each.

Because the expression in Condition is configured based on Apply to each.

Please take a try again.

 

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.

View solution in original post

Dear Barry,

 

Thank you so much for helping me on that issue. 

 

Its working Now. 🙂

 

Regards,

Sherif,

Skai
Regular Visitor

I had the same issue, and it was solved with a workaround when I converted the time zone (entering the same value in source and destination time zone) following the solution as described here:  

https://flow.microsoft.com/en-us/blog/working-with-dates-and-times/


Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,522)