Skip to main content
Nintex Community Menu Bar

Reset Multi-Value list lookup control using JavaScript

  • August 26, 2016
  • 3 replies
  • 76 views

Forum|alt.badge.img+3

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.

3 replies

Forum|alt.badge.img+14
  • Scholar
  • September 4, 2016

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");


Forum|alt.badge.img
  • November 11, 2016

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


Forum|alt.badge.img+2
  • August 30, 2018

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.