I have a Nintex form with two choice controls (radio buttons) and three YesNo controls. I need to set the selection of the first choice control based on the values selected for the three YesNo controls and the second choice control. From what I've read, this is not possible in Nintex via a rule, but only via custom Javascript. So I added a button to my form which, when clicked, is set up to run the following Javascript:
function TabsFunction() {
var myVar = NWF${'#' + ChoiceCtl1).val();
if ((NWF$('#' + CheckBox1).prop('checked') || NWF$('#' + CheckBox2).prop('checked') || NWF$('#' + CheckBox3).prop('checked')) && myVar == null )
{
NWF$('#' + ChoiceCtl2).val('RCFA Investigation');
}
if ((myVar != null )
{
NWF$('#' + ChoiceCtl2).val('SQESH Investigation');
}
}
I added this ClientClick to the button:
NWF$(document).ready(function(){TabsFunction();});
When I try to test my form with this, all I get is "Please wait".
I am familiar with Javascript but I don't really know 1) what the proper syntax is for Nintex, 2) what is the proper way to check if a choice control selection has been made or not, or 3) if this can even be done in Nintex. I have searched extensively but still haven't found a workable method.
Any help or guidance to resources will be greatly appreciated!