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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Form Date (not required)
Power Automate
Unanswered

Form Date (not required)

(0) ShareShare
ReportReport
Posted on by 4

I am working with an employee form where the employee selects yes or no on a certfication and enters in the date of that certfication IF they have selected yes.

The issue is with power automate.  Because that date is not required, I keep getting an error when running the flow.

 

I have tried formatdatetime and all that good stuff.  How can I get this to input the date when one is entered or leave it blank if one is not entered?

 

Thanks all-I am on hour 4 of trying to figure this out!

Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    Hey @sroet2938 

     

    So the Date can be Empty right? If I understand correctly when the date is empty is my understanding correct?

     

    In that case, you can use an expression like below:

     

    You can try the expression is as below(change the dynamic values with your values)...

     

    if(empty(outputs('Get_response_details')?['body/rbf4dd1ae786548b882a92abca7xxxxxxx']), '0',outputs('Get_response_details')?['body/rbf4dd1ae786548b882a92abca7xxxxxxx])
     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @sroet2938 

     

    You have to check whether the date field is empty or not. if it is empty, assign with '' else format the datetime see below expression for demo:

     

    if(empty(outputs('Get_response_details')?['body/r959c7f6c850d423aa6e881034be8f9c2']),'',formatDateTime(outputs('Get_response_details')?['body/r959c7f6c850d423aa6e881034be8f9c2'],'yyyy-MM-dd'))
     
    [in your case , replace the highlighted expression part with your datetime field dynamic content ]
     
    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • sroet2938 Profile Picture
    4 on at

    Thank you!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard