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 / power automate runtime...
Power Automate
Unanswered

power automate runtime error: null doesn't have expected String/date format

(1) ShareShare
ReportReport
Posted on by 14
I have a condition handled in my Microsoft Form with branching: are samples ready? If the answer is yes, then the user won't see the "by when" [due date] question (hence no response).
In my flow  I get an error if I set the Sample Date variable to null for that condition. What is the correct "null" equivalent? 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at
    Hi
     
    Question, did you put the expression null from the expression tab or did you put null as in you just typed it in?
     
    Also, why put anything there if its null/blank?
     
    Is Condition 1, just checking if its null/blank and then setting it to either the value or not?
     
    just add this expression to your Create item for the date field. This is what mine looks like for my date field on my form that is possibly blank/null/empty
    coalesce(outputs('Get_response_details')?['body/r94402850cc3a418f878b0f01beeedd91'],
               outputs('Get_response_details')?['body/r94402850cc3a418f878b0f01beeedd91'])
     
    Here is my example
    I have a form with a Date, I will leave it blank, since its blank, i don't have to say null or empty or anything IN the field value. the expression will just do nothing
    and as long as in the table, its ok to be null/empty, you are done.
     
    And so in my flow if its NOT sent in, it leaves nothing for the Date, if its sent in, it sets the Date
     
     
     
     
     
     
     
     
     
  • KdP_300 Profile Picture
    14 on at
    Thanks very much for the response. I have removed the variable & condition and have simplified the flow. 
    When I run it with the proposed function:
    I get the following error message:
    "Action 'Create_item' failed: The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/sampleduedate' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'.
     
     
     
  • KdP_300 Profile Picture
    14 on at
    And just to be clear: if there is a date it executes OK:
    It aligns with your flow "And so in my flow if its NOT sent in, it leaves nothing for the Date, if its sent in, it sets the Date", however when there is no date I get an error. I guess it's because the Create Item cannot accept the null that the coalesce function returns if there is no date?
    How do I resolve this? Thanks

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