AnsweredAssumed Answered

Select drop down control value to calculated value on button click

Question asked by jnboud on Sep 22, 2016
Latest reply on Oct 24, 2016 by emha

Nintex doesn't have action rules like InfoPath does, so I'm not even sure if this is possible in Nintex.

I have a calculated value string control in my form which is set to an investigation type based on input from other controls. I want to set the selected value of my Investigation Type dropdown control to the value of this calculated value control when a button is clicked (I don't what to do this using a default for the dropdown). The only way I can possibly see to do this is via a javascript button. My calculated field is named CalcInvType, with a stored client ID of varInvType. My Investigation Type dropdown control is named InvType with a stored client ID of varInvType.

 

I have a javascript button on my form with client click  = SetValues(). My form's custom javascript looks like this:

 

function SetValues() {

               NWF$(‘#’+ddlInvType).selectedItem(NWF$(‘#’+varInvType).Value);

}

 

When I preview the form, or open it to add an item, I input my data and I can see the value of the calculated value control. When I click on the javascript button, it appears that nothing happens. The dropdown control value isn't set to anything.

 

I also tried changing the custom javascript to display a message:

function SetValues() {

               alert("Hello");

}

 

and that worked fine.

 

If my original custom javascript has an error in it, I don't know what it is. Is there a specific syntax that should be used in Nintex?

Outcomes