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 + Share...
Power Automate
Unanswered

Power Automate + SharePoint Date Field (Create Item Action Fails)

(1) ShareShare
ReportReport
Posted on by 26

We are building a Power Automate flow that submits Microsoft Forms responses into a SharePoint list using the Create item action.

One of our SharePoint fields, Contract Start Date, is of type Date and Time.

In the form, this field is optional, so sometimes the user leaves it blank.

 

When the form is submitted without a Contract Start Date, the flow fails at the Create item step with the following error:

"Action 'Create_item' failed: The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Contractstartdate' is required to be of type 'String/date'. The runtime value '" "' to be converted doesn't have the expected format 'String/date'."
 

We are already using an if() expression to handle blank values, like this:

if(empty(outputs('Get_response_details')?['body/FieldID']), null, formatDateTime(outputs('Get_response_details')?['body/FieldID'], 'yyyy-MM-dd'))

 

But even with that logic, the flow still fails when the form is submitted without a date.

 

What We’re Trying to Do

We want to:

 
And yes i'm sure the fieldID is the right one =) 
  • Allow the user to optionally leave the Contract Start Date blank.

  • Submit either:

     

    a valid yyyy-MM-dd formatted date, or

     

    null if the date was not provided

    avoid flow failure. 

Categories:
I have the same question (0)
  • MS.Ragavendar Profile Picture
    4,977 Super User 2025 Season 2 on at
     
    In the form, this field is optional, so sometimes the user leaves it blank - Its okay but in the backend is the field is mandatory, If yes make the field as not required one!
     
    However with the problem,  will try with Simple solution, try create a condition control branch
     
    empty(outputs('Get_response_details')?['body/FieldID']) 
     
    Yes - >  Create item action without the date field at all
     
    No -> Create item action with proper date field format.
     
    item/Contractstartdate: formatDateTime(
        outputs('Get_response_details')?['body/FieldID'], 
        'yyyy-MM-dd'
    )
     
    Or other way we will optimize ur current code.
     

    if(empty(outputs('Get_response_details')?['body/FieldID']), null, formatDateTime(outputs('Get_response_details')?['body/FieldID'], 'yyyy-MM-dd'))

    To

    coalesce(
      if(
        empty(outputs('Get_response_details')?['body/FieldID']),
        null,
        formatDateTime(outputs('Get_response_details')?['body/FieldID'], 'yyyy-MM-dd')
      ),
      null
    )
    
     
    If this also doesn't work pass this to compose action & compose action output to the create item sharepoint action.
     
    Revert me if you have any queries.
     
    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item
     
  • matthieudumont Profile Picture
    26 on at
     
    Thanks for the prompt answer. 
     
    Unfortunately i'd like to avoid the condition control branch cause we could end up with many branches as we have multiple option dates... 
     
    I tried the "coalesce" expression with no success, still the same answer: "Action 'Create_item' failed: The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Contractstartdate' is required to be of type 'String/date'. The runtime value '" "' to be converted doesn't have the expected format 'String/date'."
     
    I also tried the compose action into the create item, still failing... 
     
  • MS.Ragavendar Profile Picture
    4,977 Super User 2025 Season 2 on at
     
    Is the field required field in the backend can you please confirm that ?
     
  • matthieudumont Profile Picture
    26 on at
    @MS.Ragavendar in the microsoft form we are getting the data from? if yes, then yes it is mandatory depending on the path they choose. 
     
    if they choose an option from the form, then it does not show that question and they don't have to fill it
  • MS.Ragavendar Profile Picture
    4,977 Super User 2025 Season 2 on at
     
    I will try to replicate the things from my end can you please provide the sharepoint backend schema as screenshot (please mask  or hide the url).
  • matthieudumont Profile Picture
    26 on at
    @MS.Ragavendar 
     
    here you go:
     
    (sorry my sharepoint is in french) 

     
    Let me know if you need anything else

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