I have built 2 Flows linked to a SharePoint list both of which send emails. Both emails include a date field in the message body and, as by default the date is in the format yyyy-mm-dd, I have added formatting (with an additonal check that a date has been entered)
if(equals(triggerBody()?['TaskDueDate'],null),'Due date not set',formatDateTime(triggerBody()?['TaskDueDate'],'dd/MM/yyyy'))
This works fine for the first Flow I created but for the second I get "Due Date not set" as the output. I coped the expression from the first Flow, both are using the same list item for testing and when I output the field with no formatting it outputs the correct date.
I can't see why the behaviour is different, has anyone come across this before?
Sounds really weird, and very frustrating. My only guess is that one of your flows is updating the item, so when the other flow is reading it, the value is not NULL anymore.
Have you tried with coalesce() function as a workaround?
For example, adding a Compose action block before evauating your condition:
coalesce(triggerBody()?['TaskDueDate'],'Due date not set')
It can help you to doublecheck if your variable is null from second service logic point of view
Hope this helps
The problem isn't that the field is being updated, neither flow changes this field so it's always populated. I've also switched off the Flow I wasn't working to stop unnecessary emails so they wouldn't be able to conflict.
Hi @NeilSantucci ,
If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.
I have made a test on my side, it can works well:
The expression in Compose is:
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Many congratulations to the Season 1 2021 Flownaut Crew!
Check out our new profile badges recognizing authored solutions!
Check out the community blog page where you can find valuable learning material from community and product team members!