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?
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
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:
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
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
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
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']
)
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.
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'])
Any ideas?
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1