Hello!
I really hope someone can help!
I had a flow which was working - it was picking up the expiry dates that were equal to 56 days from now. I tried to replicate the same thing with a list that had been imported to no avail. My flow did work for items I entered manually, now it says the flow worked successfully but it says 'False' in relation to items expiring within 56 days - I know that this is not the case - there are items with dates 56 days from now.
I was using an old template which gave me the option to edit the condition in advance mode so I attempted to use this again - as it didn't work with the data that had been imported I tried to build another from scratch - this worked for items 'less than or equals to' but the flow kept saying it was failing even though it was returning the items I needed.
Please see the screenshots below - something is wrong but for the life of me I can't figure out what. One flow has filter array - I can't remember why I used it but it was working with the list I had entered manually, the other flow is a simple 'get items', 'condition', send email. If you can advise me what the best practice would be I'd be ever so grateful.
Any help is appreciated.
It works!!! Thank you both so very much. 🙂
Hi @Anonymous ,
It seems that the date column contains an empty value, so this error display.
And I noticed that you fill the output from Get item action, if so, the method provided by ScottShearer can achieve your requirements.
Please try to configure Filter Query as follows:
Similarly, you could also use length() function to check if there are any eligible items.
Hope this helps.
Best Regards,
Hi Barry,
I tried your approach but unfortunately I get the following error:
"The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@lessOrEquals(item()?['Employer_x0020_Liability_x0020_I'], formatDateTime(addDays(utcNow(), 56), 'yyyy-MM-dd'))' failed: 'The template language function 'lessOrEquals' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'."
Any ideas?
Thanks for your time.
Hi @Anonymous ,
Maybe you could try the following configuration:
Use Filter array to filter the eligible items and use length() function to check if there are eligible items in the body of Filter array.
If the result of length() function does not equal to 0, send an email.
Image reference:
Hope this helps.
Best Regards,
Hi Scott,
Thanks for your help. It would be amazing if I could get this to work, unfortunately I get the following message:
@Anonymous
The flow below should be very close to what you need. The expression that I used can be seen in the action comments. Please note the following:
Thank you for your reply.
The only condition is for an email to be sent if a contract is due to expire 56 days from now. If I use the option less than or equals to I will get a number of emails sent through and that's not ideal.
Do let me know what works best.
Many thanks!
@Anonymous
I'm not sure what is causing your issue but I am pretty certain that the Flow can be made dramatically more simple. What are your conditions? The expiration date must be 56 days from today - do any other conditions apply?
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1