AnsweredAssumed Answered

Changing list lookup dropdown selection based on yes/no value

Question asked by james.rocha on Jun 22, 2017
Latest reply on Jun 26, 2017 by frank.field@nintex.com

I'm having trouble with my getting my Nintex form list lookup dropdown to behave how I want it to. I'm very new to both Nintex and javascript, so please excuse me if I use the wrong terms or miss out important information.

 

I have a list lookup dropdown control on my form that is linked to a column in a separate list I've produced in SharePoint 2013. It displays the contents of that list just fine, and lets you pick any entry. I also have a yes/no control on the form. When the yes/no control is checked, I want the list lookup dropdown entry to change from whatever was previous selected to the entry 'n/a' (which is ID1).

 

The list look up dropdown control is called 'Shipping Terms DD', has 'Store Client ID in JavaScript variable' set to 'yes', and a 'Client ID JavaScript variable name' of 'ddlShipTerms'.

 

The yes/no control is called 'chkboxYes', has 'Store Client ID in JavaScript variable' set to 'yes', and a 'Client ID JavaScript variable name' of 'varcheckboxYes'.

 

The form itself has the following Custom JavaScript enabled:

 

NWF$("#"+varcheckboxYes).click(function(){
if(NWF$(this).prop("checked")){
NWF$("#"+ddlShipTerms).val('1');
}
});

 

Ticking the yes/no control does not achieve anything. Nothing changes in the dropdown. Can anyone please tell me where I'm going wrong?

 

Many thanks, in advance.

Outcomes