AnsweredAssumed Answered

Updating/Triggering Form Variable with JavaScript

Question asked by chaddavis on Jul 31, 2018
Latest reply on Aug 6, 2018 by N M

I'm looking for a way to trigger one or more Form Variables using JavaScript.


I did find an article with a comment by @azetuche (Re: Can i catch the form variables in javascript in Nintex forms ??) using the following code to set the value of a Form Variable:

NWF$('[data-controlname*=FormVariableName] input').val();

but that's setting the value directly, and not exactly what I need.


I have several List Lookups as checkboxes on this form. When the checkboxes are selected, I have Form Variables running calculations. These are working great on their own.


I also have one unbound checkbox called Select All. When this checkbox is selected, I have JavaScript checking all of the checkboxes. Unfortunately, this action is not triggering the Form Variables to run their calculations. 


I've also unsuccessfully tried using the JavaScript from above, but using .trigger() instead of .val().


Additionally, I found Populate dynamically a calculated value by using a JavaScript function call which uses


but that didn't work either because I'm not using Calculated Value fields, and I'd prefer not to.


Any help would be greatly appreciated.