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

Dynamic userform which clears the previous selections

Jump to solution

Hello all,

I have some problems about using Nintex forms, here is my question:

In the attached picture1, there is a dropdown list named "List" with selection choices "Ok", "Nok", "Assessment Required". When the condition is "Ok" or "Nok" i have disable the Assessment Type selection list and everything is fine. But when the user selects "Assessment Required" in the list Assessment Type list actives and the user can select "TEST" or "CAE" options. The problem is arising here, if the user selects "TEST" or "CAE" option in the below list then changes his mind and selects another option in the above list such as "Ok" or "Nok" then the below selection will still stand there as a selection. I want to clear the Assessment Type selection when the user chooses "Ok" or "Nok" in the above list.

Is there a java script or smart approach to do this?

 

Thanks in advance...

0 Kudos
Reply
5 Replies
Workflow Hero

Re: Dynamic userform which clears the previous selections

Jump to solution

are your dropdowns choice or lookup controls?

0 Kudos
Reply
Workflow Hero

Re: Dynamic userform which clears the previous selections

Jump to solution

Dropdowns are choice, should they be lookup control? 

0 Kudos
Reply
Workflow Hero

Re: Dynamic userform which clears the previous selections

Jump to solution

in principle in doesn't matter, it's possible for both type of controls. it just need different approach.

however, for choice control javascript is needed, for lookup it would be just matter of configuration.

so, following code should clear choice control based on other choice control change

NWF.FormFiller.Events.RegisterAfterReady(function () {
   NWF$('#' + varList).change(function(evt){
      if (evt.target.value == 'Ok' || evt.target.value == 'Nok' ){
         NWF$('#'+varAT).val('');
      }   
   })
})

varList is javascript variable of List choice control.

varAT is javascript variable of Assesment type choice control.

Reply
Workflow Hero

Re: Dynamic userform which clears the previous selections

Jump to solution

I have added ";" at the end of the code, since without it gave me error as "please wait" along time and the screen does not response. However now i can preview and see the user form screen now, but script does not clear the Assessment Type (AT) choice when "IQ" is selected as "Ok" or "Nok". I have uploaded some pictures, what can be the problem?Script page

variable1

variable2

0 Kudos
Reply
Workflow Hero

Re: Dynamic userform which clears the previous selections

Jump to solution

once again, they are not control's names but rather control's javascript variables!

Reply