Skip to main content
Community site session details

Community site session details

Session Id : E0WGGFlolTMZ86/WpMsGYm
Power Automate - General Discussion
Unanswered

Writing null date value to SharePoint List

Like (0) ShareShare
ReportReport
Posted on 13 Dec 2021 04:04:42 by 53

I have a flow that takes data from an excel file and writes to a SharePoint List. The flow works well until it runs into a date column that is empty. Upon which I get the error message below

 

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

 

I would appreciate any help in resolving this issue.

 

I have read various posts suggesting that one potential solution is to use the expression below

 

if(equals(outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c'],''),null,outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c'])

 

Where the bolded and blue part is the column ID from excel. 

Question 2: Where can I get this value (column ID)  from?

  • Heyner128 Profile Picture
    4 on 22 May 2024 at 07:00:54
    Re: Writing null date value to SharePoint List

    Hi,

     

    The field is a date type and it's not required, and tried the or() solution and it doesn't work. I spent so much time trying to solve this, so i did this workaround and it works:

     

    if(
     empty(body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce']),
     parseDateTime('1970-01-01T00:00Z'),
     body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce']
    )

     

    i don't know why there's such casting from null to "", but maybe it's temporary,

     

    Heyner

     

  • Ellis Karim Profile Picture
    11,143 Super User 2025 Season 1 on 21 May 2024 at 20:58:08
    Re: Writing null date value to SharePoint List

    Hi @Heyner128 ,

     

    Can you confirm that the column is a MS Forms column of type date? Is it a required field?

    MS Forms will at least validate that whatever is input is actually a date:  

    2024-05-21_21-54-40.PNG

    You could combine the two IF conditions, but I think we need to understand the above point first.

    if(
     or(
     equals(body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce'], null),
     empty(body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce'])
     ),
     null,
     body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce']
    )
    

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • Heyner128 Profile Picture
    4 on 21 May 2024 at 15:29:27
    Re: Writing null date value to SharePoint List

    For reference, none of this aproaches is working right now. What i've tried:

     

    1. 

    if(
     equals(body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce'], null),
     null,
     body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce']
    )

     2.

    if(
     empty(body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce']),
     null,
     body('Get_form_response_details')?['re9ab076a8e07434a80ff04f5c17234ce']
    )

     

    It's seems to be an internal casting from the literal null to "" into the true condition result

  • Ellis Karim Profile Picture
    11,143 Super User 2025 Season 1 on 09 Mar 2024 at 15:37:42
    Re: Writing null date value to SharePoint List

    Hi @vincetaylor .

     

    Try using the empty() function.

     

    In the Create item action for column field_9, try the following expression: 

    if (
     empty(outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c']),
     null,
     outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c']
    )
    

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • DJ_Jamba Profile Picture
    2,822 Super User 2025 Season 1 on 09 Mar 2024 at 14:01:58
    Re: Writing null date value to SharePoint List

    Hi @vincetaylor 

     

    1. Could you double check that whatever field_9 is in SharePoint is not marked as a required field?

    2. If field_9 is a required field, you cannot pass blank/null to it

    3. Additionally, there is conversion going on somewhere in your code, but the value to be converted is null

    4. A slight tweak to your if statement:

    if(
     equals(
     outputs('Get_response_details')?'body/ra66dc3ce64ec4c63af091d4ced99b95c'],
     null
     ),
     null,
     outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c']
    )
  • doneill5294 Profile Picture
    2 on 08 Mar 2024 at 15:26:13
    Re: Writing null date value to SharePoint List

    Did you get a response to this.  I am working on a timesheet with many dates that may not have a value and using an expression still gives me blanks on my List whether or not I enter a date in the form.  

  • Mastronardi Profile Picture
    8 on 14 Jan 2022 at 18:57:49
    Re: Writing null date value to SharePoint List

    I built a Microsoft Form + a Power Automate flow to auto populate a Sharepoint List. The form's first question has branching that lets the user select various departments in the company. The following list of questions are all the same, except for one. One department has an extra follow up question, which means this section of the form is left blank, if you choose one of the other departments. So, every time they submit, the form pushes an empty cell to the Sharepoint List. Initially, the flow would fail every time because of that blank cell. 

     

    This wonderful solution below from @vincetaylor  got me around my problem initially. Using this IF statement stops the failures, but the List no longer pulls in the value entered for that specific department with the extra question. So, instead of failing, the cell in that column is just blank, even when someone inputs data. I need a version of this solution (below) that allows the empty cell, but also pulls in the actual values when someone inputs that data. Any ideas?

     

    The solution: 

     

    if(equals(outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c'],''),null,outputs('Get_response_details')?['body/ra66dc3ce64ec4c63af091d4ced99b95c'])

     

     

     

     

     

  • vincetaylor Profile Picture
    53 on 13 Dec 2021 at 18:23:15
    Re: Writing null date value to SharePoint List

    Any ideas?

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Loading complete