Skip to main content
Nintex Community Menu Bar

K2 cannot save empty dates

  • February 2, 2017
  • 3 replies
  • 95 views
  • Translate

Forum|alt.badge.img+6

Good morning,

 

On a K2 view I have 2 date fields. They are not requiered on the view, neither in the sharepoint list where they are saved and also  they are not requiered on the smartobject.

 

But when I run the form and try to save data K2 pop ups an error (see screenshot attached).

 

My question is, how can I save a blank/empty/null date field on sharepoint list?

 

Thanks

 

Will.


14497iCEF37EDE1C824136.jpg

Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+9
  • 142 replies
  • February 2, 2017

Hi LDWill,

 

       As per my knowledge with SharePoint 2010,  ListItem doesn't allow empty or null datetime. But there is a workaround for this, you can pass minimum Date value i.e. 01/01/0001 while your date is empty.

 

 Sharepoint consider 01/01/0001 as minimum date value . In your form  use inline function to check datetime if it is empty then replace it with minimum Date  value i.e. 01/01/0001 else pass actual date.

 

And while you are displaing datetime on Smartform control  again use inline control to convert 01/01/0001 back to empty value. 

Translate

Forum|alt.badge.img+6
  • Author
  • 35 replies
  • February 3, 2017

Kran,

 

thanks for the answer. It looks like a good workaround.

 

Can you explain me the last part of it?

 

And while you are displaing datetime on Smartform control  again use inline control to convert 01/01/0001 back to empty value. 

Thanks,

 

Will

Translate

Forum|alt.badge.img+9
  • 142 replies
  • February 3, 2017

Hi LDWill,

 

                I mean to say, In case you want to display date field on form  then by default it will appear as 01/01/0001, so to avoid it from displaing as  wrongly, you need to replace back this with Empty string as we are considering Empty date  as 01/01/0001  while adding data to SPList item.

 

 

during form initlization  you can add rule to do this.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings