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 / Flow fails to Create S...
Power Automate
Unanswered

Flow fails to Create SharePoint list item if data type date is blanks

(0) ShareShare
ReportReport
Posted on by 34

We have a fairly basic Flow which is getting MS Form responses and creating SharePoint list items. The Form has branching it in which results in some questions never being asked/answered. When the Flow creates the item, its failing due to a blank not being accepted in the date columns. Example of error:

 

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

 

Any thoughts would be very much appreciated.

Categories:
I have the same question (0)
  • manuelstgomes Profile Picture
    6,625 on at

    Hi @BFlow 

     

    The issue here is that, even if you define in the Form a Date, Power Automate will always receive a string value. The same for all other field types. You need to convert it to the expected value in your SharePoint list.

     

    I go into more detail here:

    https://manueltgomes.com/microsoft/forms/format-submitted-data/

     

    Can you please check if and let me know if you have any questions?

     

    Cheers
    Manuel

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

  • Verified answer
    tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @BFlow ,

    instead of using the date directly, you should use an expression. You should check if the date contains any value or if it's empty. If it's empty, update 'null' value into the column (to keep it empty); if it's not empty, update the actual value. Currently it's trying to update "" into the date column if the Forms field is empty which is not a valid input.

    Power Automate has if(...) expression you can use, it expects 3 parameters:

    if(condition, ifTrueValue, ifFalseValue)

    Using an actual example from my flow the full expression would look like this:

    if(equals(outputs('Get_response_details')?['body/r7bf27a2bed93456ca71c844977a3fd4b'],''),null,formatDateTime(outputs('Get_response_details')?['body/r7bf27a2bed93456ca71c844977a3fd4b']))
    
    condition: equals(outputs('Get_response_details')?['body/r7bf27a2bed93456ca71c844977a3fd4b'],'')
    ifTrueValue: update null into the date column
    ifFalseValue: update the actual date from the form

    The value outputs(...)?[...] is the dynamic content representing the Forms field.

    image.png

  • BFlow Profile Picture
    34 on at

    Worked perfectly! Thank you tom.

  • arinborg Profile Picture
    11 on at

    Hi @tom_riha ,

    I have a similar issue as @BFlow . I tried to under the expression given by you but I couldn't get through to it.

    Kindly help please.

     

    This is what the questions look like:

    1.PNG

    2.PNG

    The branching is with Q26.

     

    Whenever I choose no, There is an error similar to the one above except it for Numbers instead of dates.

     

    This is what my flow looks like.

     

    3.PNG

    Please please help. 😕

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @arinborg ,

    what exactly says the error message?

  • arinborg Profile Picture
    11 on at

    Hi @tom_riha 

    This is the error that pops up
    The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Havethingsimprovedsincethelastsu' is required to be of type 'Number/double'. The runtime value '""' to be converted doesn't have the expected format 'Number/double'.

     

    I think its because it doesnt accept a blank value if someone were to say no instead of yes.

  • arinborg Profile Picture
    11 on at

    Hi @tom_riha ,

    Apologies for being impatient, This project is due next week and this is the only roadblock left for it. 😅

    Thank you again!

  • arinborg Profile Picture
    11 on at

    Hi @tom_riha ,

    I got this solved, Thanks to your above expression, I tried to understand it myself. 

    It's done, Phew

    Thanks alot!

  • Scunners Profile Picture
    2 on at

    I have an excel sheet and it imports 30% of the list fine. The rest will not import due to string/date error and yet there are No visible differences in row entries. My gut feeling it is an issue between American and U.K. Date formats. The sharepoint list is region locale U.K. The date format I need to use is dd/MM/yyyy my spreadsheet is in this format and I use an expression to get the correct date format. I am sure it is because 13 Oct in U.K. Is 13/10 but in US 10/13 and the months are mis mapped as there isn't a month 13. Can you help? 

  • vincetaylor Profile Picture
    53 on at

    @tom_riha 
    In your example, What does this value represent " r7bf27a2bed93456ca71c844977a3fd4b"

    And how do I obtain this value?

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard