Hi everyone
I am working on a flow that sends an HTML table by email on a weekly basis, containing a summary of data from a SharePoint list. This list contains three different date fields. I'll also preface this with a note to say I am self-taught when it comes to Power Automate, so I may have some fundamental knowledge gaps that might be obvious to others.
The first issue I had with the dates involved getting the dates to reflect the appropriate date format (I need dd/MM/yyyy). I had to use two different approaches to achieve this. For the first, I successfully used the formatDateTime() expression - but this would not work for the other two date fields for some reason I can't identify. For the other two, I used the following actions to change the date format (it achieves what I need perfectly).
HOWEVER, now I have an issue where my flow will fail if any of the date fields in my list are blank. I have ensured that all date fields in the List are not set as required fields. I have tried to use the following expression:
if(equals(outputs('Dynamic field for set variable'),null),'',outputs('Dynamic field for set variable'))
...but of course, it doesn't like that. And if I use the List's corresponding date fields, the date is in the wrong format.
Any suggestions for getting around this issue? If anyone could explain why workflows fail when a date field is left blank too, despite the field not being a 'required field' I would really appreciate the insight for my own understanding too.
Many thanks
I solved this one on my own using the following expression in the relevant Select action field, removing the need for Variable and Convert Time Zone actions:
Hi @eellis1 ,
Please try:
if(equals(outputs('Dynamic field for set variable'),null),null,outputs('Dynamic field for set variable'))
Best Regards
Cheng Feng
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