cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MS07
Level: Powered On

Flow to create item in SharePoint List when Form is submitted fails when no date entered for one question

I have a Microsoft Form which will populate a SharePoint list.

 

On the form is a "date access required until" question, which is a date field. This question does not always require an answer so may be left blank. However when it is left blank the Flow to create the item in the SharePoint list fails with:

 

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

 

Can I get round this at all?

 

Secondary question - If there is a date entered, and this appears in the SharePoint List, I would like an email notification on the date that has been entered. Does this require me to NOt have this field as a date/time filed in SharePoint List?

 

Thank you.

3 REPLIES 3
Super User
Super User

Re: Flow to create item in SharePoint List when Form is submitted fails when no date entered for one question

@MS07 

I am unable to replicate your issue.  Can you please do the following so that I and others might assist:

1) Verify that both the SharePoint column and the Forms field are both configured to be dates?

2) Post a screen shot of your Flow

 

I tested a Flow and it ran successfully with and without a date entered in Forms.

 

Also, regarding the email, you'll probably want to create a separate Flow with a recurrence trigger configured to run once a day.  Then, use a Get Items action with an OData filter.  Using the filter will limit the items returned to those with a date in your date column of today.  Then simply loop through the results and send your email.  The SharePoint column should be a date column.

DateFilter.jpg

 

 

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

Scott
Dual Super User
Dual Super User

Re: Flow to create item in SharePoint List when Form is submitted fails when no date entered for one question

Hi @MS07 

 

You can keep the date field in SharePoint

 

when adding item in SharePoint using Flow

 

for the date field add the following expression

 

if(empty(datefield),null,datefield)
 
Where datefield - dynamic content date field value from MS Form
 
This will set it to null/empty in SharePoint if no value
or populate it with data
 
For sending email id date is filled
Add a condition in flow
Use flow condition your datefield is not equal to null and send email
 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 
 
Lochwood
Level: Powered On

Re: Flow to create item in SharePoint List when Form is submitted fails when no date entered for one question

I cant seem to get this working.. the error I get in flow.. " The expression is invalid"

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Users online (6,384)