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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (3,042)