cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lochwood
Frequent Visitor

Flow Fails to Update List When Form Field is Blank

I have a form with multiple fields where not all fields need to be filled in. This form data gets added to a record on a sharepoint list. if all fields on the sharepoint list are text, the flow runs fine but if i have some date and number fields on the list and these corresponding  form fields are blank, the flow fails with error E:G

 

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

 

Can anyone help me with this. getting no where

Flow Dynamics Travel Claim Form.jpgFlow Dynamics Travel Claim Form2.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @Lochwood ,

 

Please refer to the following method to configure Date field:

155.PNG

Expression reference:

if(empty(outputs('Compose')),null,outputs('Compose'))

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

12 REPLIES 12
abm
Super User III
Super User III

Hi @Lochwood 

 

Is your date field 'Mileage1_Claim_Date' value getting blank from the forms. Is that optional?

 

Thanks 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Lochwood
Frequent Visitor

Yes I have 15 date fields and 15 number fields.. only some date and number fields get filled in at any one time. Mileage1_Claim_Date is one of those date fields.

abm
Super User III
Super User III

Hi @Lochwood 

 

So that's your issue is. Check the value is empty or null then don't format the date. 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
abm
Super User III
Super User III

Try the below expression. 

 

if(not(empty('yourdatefield')), 'use the formatted datetime expression', '')
 
Replace your fields accordingly.


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Lochwood
Frequent Visitor

can you help with how i do that?

abm
Super User III
Super User III

Hi @Lochwood 

 

Remove the current datetime mapping. Then on the right hand side you need to click the expression tab. Use the expression I sent you earlier and replace the values accordingly. 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Lochwood
Frequent Visitor

so am i right in saying i have to input some sort of date and cannot leave it blank? i have used your example with a 'use the formatted datetime expression' of 1/1/1900 and it worked. THANK YOU!! is there no way to have the field null in the list?

Lochwood
Frequent Visitor

Just realised this is actually replacing form data as well as empty fields. Here is my example. 

 

if(not(empty('body/rd4b46c30f2294fc683cdb016fc586b1d')), '0', '')

 

i have also tried 

if(not(empty(outputs('Get_response_details')?['body/r55f03b13cea748fc9bd1be548fadc6aa'])), '0', '')
 
with same results. any ideas?

 

 

abm
Super User III
Super User III

Believe your expression mapping is in SharePoint Create Item action? Not sure how its replacing the form data. Not sure I understood it correctly.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

 

Hi @Lochwood ,

 

Please refer to the following method to configure Date field:

155.PNG

Expression reference:

if(empty(outputs('Compose')),null,outputs('Compose'))

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks for this.. Do i have to create a compose for each field? i have 30 fields so this would be 30 compose statements.

 

Hi @Lochwood ,

 

In fact, you don't need to use Compose, I just want to explain this method to you.

You could configure expression directly in the field of Create item action, like:

78900.gif

You can configure the fields in the Create item action like I configured Compose.

You can do similar operations for each answer or field.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (30,717)