cancel
Showing results for 
Search instead for 
Did you mean: 
asingh
Nintex Newbie

Reset Multi-Value list lookup control using JavaScript

Hello Everyone

I am currently working on Nintex Form where I want to reset Multi select list lookup control. On the form I have a Reset button. When user clicks Reset button I have to reset all controls on the form. I can reset all the controls using JavaScript but not sure how do I go about resetting multi-select List Lookup. I came across an example where using JavaScript we can set the default value for the multi-select list lookup but in my case I would need to do the reverse of that. https://community.nintex.com/thread/10276

Thank you in advance for your help.

0 Kudos
Reply
3 Replies
Automation Master
Automation Master

Re: Reset Multi-Value list lookup control using JavaScript

I haven't tested it but I would say first line of code on the link provided actually clears all the selected options

NWF$(".multiChoice option:selected").removeAttr("selected");

Reply
samit
Nintex Newbie

Re: Reset Multi-Value list lookup control using JavaScript

Hello,

You can achieve this by following step:-

1. Add multiChoice class to the multi select control from setting.

2. Call following script from button to remove all selected items.

NWF$(".multiChoice option").each(function() {
$(this).prop("selected", true);
})
NWF$(".multiChoice button:nth-child(2)").click();

I hope this will help you.

Thanks & Regards,

-Samit

Reply
dnes24
Nintex Newbie

Re: Reset Multi-Value list lookup control using JavaScript

None of the above options worked for me to reset the multi lookup column in Nintex form 2013.

Is there any other way to achieve it.

Please help.

0 Kudos
Reply