web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Variables on Blank Dates
Power Automate
Answered

Variables on Blank Dates

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a flow set up where I have a few variables that display the dates from a record in a user friendly format:

 

Capture.PNG

 

These work perfectly when the date fields are all filled in, however if one is left blank the flow fails. 

 

I think I may need a condition put in somewhere but not sure where to start

Categories:
I have the same question (0)
  • jhall Profile Picture
    636 on at

    Do note that "date" values in Flow are just formatted strings.  So you can use string tools to check for invalid dates.  Using a Condition step to see if the string is blank.  

     

    A quick search showed this thread which covers the main idea along with some ancillary side discussions on this:  https://powerusers.microsoft.com/t5/Building-Flows/Flow-failing-due-to-Null-value/td-p/55527

     

    This also probably starts you down a road of considering how/where data validation should occur in your particular environment/application.  Flow currently isn't the best at this in some scenarios, but given that it treats dates as strings you can DIY it with one or more Condition steps.

  • Verified answer
    v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Could you please share the full screenshot of the configuration of your flow?

     

    As @jhall said, you could add a condition to check if the date field is blank before you format the date.

    Capture.PNG

    And the expression in the Condition should as below:

    @not(empty(triggerBody()?['Date']))

     

    Best regards,

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard