cancel
Showing results for 
Search instead for 
Did you mean: 
dfox
Nintex Newbie

Calculated Value based on conditions and adding days to date

Jump to solution

Hi,

 

I am very new to Nintex and trying to create a calculated value on my form to display a date based on a condition that is listed in the column personnel type then take the implementation date and add days depending on the result of the column, but cannot get it to work.  The column is blank by default until user selects an option from the drop down.

 

Here is what I have so far, but when I try to view the form it comes up blank and won't display.  If I delete the calculated value field from the form then I am able to display the form so I know it is related to this calulated value not set up properly.

 

=PersonnelType=='Key',formatDate(dateAddDays(DateTimetoImplementChanges,120, 'MM/dd/yyyy'), formatDate(dateAddDays(DateTimetoImplementChanges,365, 'MM/dd/yyyy')

 

Thank you!

Labels: (1)
0 Kudos
Reply
2 Replies
Nintex Employee
Nintex Employee

Re: Calculated Value based on conditions and adding days to date

Jump to solution

Hi,

Unfortunately there is no formula validation in Nintex Classic or Responsive forms.

When the function is not valid it can cause the form to appear white and that is what is happening here.

The function should look like this:

If(equals(PersonnelType,"Key"),formatDate(dateAddDays(DateTimetoImplementChanges,120),"MM/dd/yyyy"),formatDate(dateAddDays(DateTimetoImplementChanges,365),"MM/dd/yyyy"))

This says that if PersonalType is equal to Key add 120 Days to DateTimetoImplementChanges and if its not equal it adds 360 days.

 

I have attached a sample form which demonstates this formula.

0 Kudos
Reply
dfox
Nintex Newbie

Re: Calculated Value based on conditions and adding days to date

Jump to solution
Thank you very much Simon for the correct function format and detailed explanation! Greatly appreciate it!!
0 Kudos
Reply