Skip to main content

When using the "Calculated Value" option in a SharePoint list on a Date Field, it shows as blank in a Nintex form, but shows correctly in the default SharePoint form.

 

Example 

Column "date2":

Column Settings

SP form: 

Sp form

Same list, Nintex Form: 
Nintex form

 

Please advise!

I guess Nintex is not using the fields default values. Bit you can set a rule on form load to set value of your field using inline function

Regards,

Tomasz


Can you step me how to do that? It's my understanding that inline functions are not a thing in the Office 365 version. 


The other way to do it would be via a bit of JavaScript:

var date = new Date();  

date.setDate(date.getDate() + 7);  

var control = NWF$("#"+ mydatecalccontrol);   if(control.val() == ""){     control.val(date.getDate() + "/" + date.getMonth() + "/" + date.getFullYear()); }


You would just drop that javascript in the form settings pane:


Aaron idea is good as well

BTW: inline functions are present in Nintex Forms for O365. Indeed they're not available for Workflows (hopefully) yet


First off, thank you for taking the time to help me with this.

See how, in your screenshot, the date showing is "15/2/2017"

That is not a date format that the form can accept. (and even if it were European format, it wouldn't be 7 days from the "today" date.).

Thoughts?

(Note: I understand how to re-order the numbers, but I still can't figure out why it's jumping back to February (2))

-------------------------

FIGURED IT OUT.

Turns out "January is 0" so you have to add one to the month to get the correct month.

Here is the final code (probably a shorter way to write this, but I'm a newb at JS):

var date = new Date();
date.setMonth(date.getMonth()+1);

date.setDate(date.getDate() + 7);

var control = NWF$("#"+ mydatecalccontrol); if(control.val() == ""){ control.val(date.getMonth() + "/" + date.getDate() + "/" + date.getFullYear()); }


date.getMonth() + "/" + date.getDate() + "/" + date.getFullYear()

Will give you the correct formatting for the US


Whoops! Sorry I spaced on that. I always forget how funky date is in JS... So that works for you now? 


Yes, working. Thank you!


Can you go ahead and mark an answer as correct so that other folks with the same question can find it easier? 


Came across this issue as well, would be nice if Nintex just respected the default values. Obviously it used to as I was following a tutorial from 2015. JS will work fine but the more JS we add the less mantainable our solutions are.


Agreed 100%


Reply