cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Nintex form

How to get  a Yes/No checkbox that toggles when a People control changes its value.

Labels: (1)
Reply
4 Replies
Workflow Hero

Re: Nintex form

So any time the people control changes you want the yes/no field to flips its value?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex form

yes

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex form

Hi Anjali,

I'm not sure if you can do this with a rule on the form. I will do this with a workflow but this means update only after you saved the form.  

The workflow will kick off with a start when modified expression comparing current value for person control with previous value for person control.  If it changed, update the value to yes (if it was no) or no (if it was yes).

Let me know if you need more information.

Accept as Solution Reply
Workflow Hero

Re: Nintex form

following code should toggle yes/no control value within form based on people picker change

function toggleYesNo(){
    NWF$('#' + jsvarYesNo).prop('checked',!NWF$('#' + jsvarYesNo).prop('checked'));
}


NWF.FormFiller.Events.RegisterAfterReady(function (){
   var PPObj = new NF.PeoplePickerApi('#' + jsvarPP);
   PPObj.added(toggleYesNo);
   PPObj.removed(toggleYesNo);
});

‍‍‍‍‍‍‍‍‍‍‍‍
Accept as Solution Reply