web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Invalid Template on Fl...
Power Automate
Unanswered

Invalid Template on Fliter Array due to date format?

(0) ShareShare
ReportReport
Posted on by 4

Hi everyone,

I am a new user trying to get some flows set up for work, as a trial. I currently have a flow to reference an excel sheet, then email our shop manager on work due within 5 days. 

 

The filter array is:

@lessOrEquals(ticks(addDays('1899-12-30', int(item()?['Date']))), formatDateTome(utcNow(), 'yyyy-MM-dd'))

 

The error details I am getting are:

The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@lessOrEquals(ticks(addDays('1899-12-30', int(item()?['Date']))), formatDateTome(utcNow(), 'yyyy-MM-dd'))' failed: 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

Any help would be great.

 

Thanks!

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That expression doesn't make sense. the int function that you are using wants to convert a text to a number, but i'm guessing that item()?['Date'] returns a date. What are you trying to get here?

  • Dkretzer14 Profile Picture
    4 on at

    I must've typed it wrong. Still trying to learn.

    Basically, when a job in our fab shop is due within 5 days, I want to to notify the shop manager.

     

    Dkretzer14_0-1642782635299.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The better way of approaching this is the add a compose action and set this to the expression:

    addDays(utcnow(), -5)

     

    This will give you that cutoff date.

     

    Then in the filter you can simply compare a field (  item()?['Date'] ) being gt  that earlier calculated date.

     

    And before I forget make sure that in the advanced options of the Excel action that you select the ISO data format.

  • Dkretzer14 Profile Picture
    4 on at

    I understand the compose function, but am still confused on the Filter Array.

    (  item()?['Date'] )  gt Outputs?

    Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 330

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 123

Last 30 days Overall leaderboard