Hi
I was creating a flow for sending an email alert for expired documents. During the test run, the flow shows error in the filter array - failed. Please help me to take a look at the screenshot below.
Waiting for your reply on this error.
Thank You
@Anonymous
Can you clarify which expression you are using?
This is what I am suggesting:
less(coalesce(item()?['ExpirationDate'], addDays(utcNow(), 1)), utcNow())
If you are sure that the Expiration date is never null, then you need to check your expression for ExpirationDate. Look back at your history, output, can you see that key name "ExpirationDate". Is the spelling correct? Have you got the path correct? Without seeing your flow it is hard to comment exactly on the cause.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉
Thank you for the solution but still, it is showing an error. The Expiration date is not null. Please help me to clarify it.
Error details below
The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@less(item()?['ExpirationDate'], less(coalesce(item()?['ExpirationDate'], addDays(utcNow(), 1), utcNow())))' failed: 'The template language function 'less' expects two parameter of matching types. The function was invoked with '1' parameter(s).'.
Thank You
Hi @DamoBird365
Thank you for the solution but still, it is showing an error. The Expiration date is not null. Please help me to clarify it.
Error details below
The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@less(item()?['ExpirationDate'], less(coalesce(item()?['ExpirationDate'], addDays(utcNow(), 1), utcNow())))' failed: 'The template language function 'less' expects two parameter of matching types. The function was invoked with '1' parameter(s).'.
Thank You
Hi @Anonymous
Did you expect ExpirationDate to be null? You might need to handle that scenario with Coalesce which will return the first non null iem from the list.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,957
Most Valuable Professional