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

Filter Array Error

I am trying to write an advanced expression on a filter array but i keep getting an error. Can anyone see anything wrong with this expression? Or is writing an "and" statement not possible for a filter array?

 

"@and(greaterOrEqual(item()?['ReportingDate'], addDays(utcNow(), -5)),equals(items()?['Title'], "ICF"))"

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Andrew0228 

 

Try the below expression

 

@and(greaterOrEquals(formatDateTime(item()?['ReportingDate'],'yyyy-MM-dd'),addDays(utcNow('yyyy-MM-dd'),-5)),equals(item()?['Title'],'ICF'))

 

Pretty sure @yashag2255  had a typo for his expression. It's greaterOrEquals and ICF must be in single quotes.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

4 REPLIES 4
yashag2255
Dual Super User II
Dual Super User II

Hi @Andrew0228 

 

can you try the below expression: 

 

@and(greaterOrEqual(formatDateTime(item()?['ReportingDate'],'yyyy-MM-dd'),addDays(utcNow('yyyy-MM-dd'),-5)),equals(item()?['Title'],"ICF"))

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @yashag2255 

 

The expression still give me an error. "Fix an invalid expression(s) for the input parameter(s) of operation 'Filter_array'". I wish it said where in the expression the error was instead of just saying there is one.  I am not sure if the date time was the error because by itself it was working fine but when i added the other parameter is when it failed. Thanks 

@yashag2255

 

I found the error if that helps "'The template function 'greaterOrEqual' is not defined or not valid.'."

Hi @Andrew0228 

 

Try the below expression

 

@and(greaterOrEquals(formatDateTime(item()?['ReportingDate'],'yyyy-MM-dd'),addDays(utcNow('yyyy-MM-dd'),-5)),equals(item()?['Title'],'ICF'))

 

Pretty sure @yashag2255  had a typo for his expression. It's greaterOrEquals and ICF must be in single quotes.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

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.

Users online (1,742)