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

How Do I Incorporate JavaScript in the "If" Formula?

I have a JS in a calculated value that I would like to populate a date field.

 

function setTextBoxDueDate(value) { NWF$('#'+ DueDate).val(value); }

But it doesn't seem to be working properly in the following case. The date field populates but it is ignoring the condition.

 

 

If(SpecialCondition=="Smoke alarms", setTextBoxDueDate(formatDate(dateAddDays(LeaseStartDate, 28), 'dd/MM/yyyy')), "")

 

 

Labels: (1)
Tags (2)
0 Kudos
Reply
1 Reply
sojanm
Nintex Newbie

Re: How Do I Incorporate JavaScript in the "If" Formula?

After setting the value in the function
NWF$('#'+ DueDate).val(value);
Add this line
NWF.FormFiller.Functions.ProcessOnChange(NWF$("#" + varDueDate));

Make sure that you are getting a proper date in the function
0 Kudos
Reply