cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FersirboneBR
New Member

Pick up items not updated for more than 90 days

Hi Guys,

I'm trying to create a flow that takes a field I created called last update, which is of type date and compares with the current date, if the difference is greater than 90 days I need you to generate an email with all these records not updated.

 

But it is giving error.

 

my stream is in portuguese, if necessary let me know and i'll translate.01.png

 

02.png

 

03.png

 

 

 
3 REPLIES 3
CraigStewart
Super User
Super User

If your condition is based on a date the '90' means nothing to it, I assume this is where your error is happening?

 

Try your condition as

 

formatDateTime(items('Aplicar_a_cada')?['YOURDATE FIELD'],'yyyy-MM-dd')
is less than or equal to
formatDateTime(addDays(utcNow('yyyy-MM-dd'), -90),'yyyy-MM-dd')

@CraigStewart / @FersirboneBR,

The AddDays() function has date format output included and therefore is no need for formatDateTime() usage.

The simpler formula is:

addDays(utcNow('yyyy-MM-dd'), -90,'yyyy-MM-dd')

 

I had already put this condition before, but it was returning all messed up. I just put this condition:
 
div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(formatDateTime(items('Aplicar_a_cada')?['Modified'],'yyyy-MM-dd'))),864000000000)
 
 apparently it worked...but in the email it sends me only 100 records, ahco that must be something with the license. I need to find out now how to format this array
 
04.png

 

it's horrible

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,989)