cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to assign a value to a control based on what has been selected in another control

Hi

In my Nintex FOrm I would like to assign/select value from a choice control based on the value of another control(check box)

How do I do that?

Labels: (3)
Tags (1)
0 Kudos
Reply
4 Replies
Not applicable

Re: How to assign a value to a control based on what has been selected in another control

Hi Nafiseh,

Use Look up control control to achieve your requirement.

Thanks

Arun

0 Kudos
Accept as Solution Reply
Not applicable

Re: How to assign a value to a control based on what has been selected in another control

I do not see Look Up Control  in my Nintex Form , Just to let you know that this is the starting form not called from nintex workflow.

0 Kudos
Accept as Solution Reply
Not applicable

Re: How to assign a value to a control based on what has been selected in another control

I think I need to write some javascript , could someone help how to write javascript in nintex form

0 Kudos
Accept as Solution Reply
Not applicable

Re: How to assign a value to a control based on what has been selected in another control

Hi Nafisah,

You can leverage on Custom Javascript by having two choice controls in your form. Snippet as shown below:

NWF$(document).ready(function(){  

   var rad = NWF$('#' + mychoice);// mychoice is the JavaScript variable name for your first choice control  

   var chc2 = NWF$('#' + mychoice2);//mychoice2 is the JavaScript variable name for your second choice control

   rad.find('input').on('change', function(){ 

      var firstChoiceVal = this.value;

      if(this.checked == true){

            NWF$.each(chc2.find('input'), function() {

            if(firstChoiceVal == this.value){

              this.checked = true;

            }

        });

      }

   });  

});

You can leverage on this script and modify accordingly to achieve your desired output. Give it a try and let me know how you go

Jeremy

0 Kudos
Accept as Solution Reply