Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Rule not firing when using Java Script to set a field valuse

I have a set of different controls that all set the Status value.  The Jave script to do that works great.  The issue I am having is when the change is made a rule to unhide the corrections box is not firing.  I have tried using the below article suggestion but that does not seem to work either.  nintex Can someone help point me in the correct direction?  The control is a choice.  Below is my javaScript

NWF.FormFiller.Events.RegisterAfterReady(function () {  
   NWF$('#' + DeanApproval).on('change', function () {
       valueChanged(NWF$('#'+ DeanApproval + ' input:checked').val()); NWF.FormFiller.Functions.control.trigger('StatusControl');                   
   }); NWF$('#' + ProvostStatus).on('change', function () {
       valueChanged(NWF$('#'+ ProvostStatus + ' input:checked').val());                             
 NWF$('#' + BudgetStatus).on('change', function () {       valueChanged(NWF$('#'+ BudgetStatus + ' input:checked').val());                                });
 NWF$('#' + HRStatus).on('change', function () {       valueChanged(NWF$('#'+ HRStatus + ' input:checked').val());                                });
}); function valueChanged(newValue){   NWF$("#" + StatusControl).val(newValue); NWF.FormFiller.Functions.control.trigger('StatusControl');
}function showPanel(){NWF$('#' + RevisionID).val(1).trigger('blur');} function hidePanel(){NWF$('#' + RevisionID).val(0).trigger('blur');}

0 Kudos
1 Reply
Workflow Hero

Re: Rule not firing when using Java Script to set a field valuse

try to change in valueChanged() function line 

NWF$("#" + StatusControl).val(newValue);


NWF$("#" + StatusControl).val(newValue).change();

... and remove all the lines with 


it's not a valid construct

0 Kudos
Accept as Solution Reply