Skip to main content
Nintex Community Menu Bar

Clear all the users from People Control on Nintex Form

  • May 17, 2017
  • 6 replies
  • 73 views

Forum|alt.badge.img+2

I have People Control added to my Nintex Form. I want all the users to be cleared/removed from the field.

The control settings are as below -

Whenever I open the form the users that were selected in the last instance are availabel. I want to remove these users from the control on the form using JavaScript.

I am able to retreive the value of these users using the below JavaScript.

var companyUsers = NWF$('#' + fldCompanyUsers).val();

alert(companyUsers);

However, I am just not able to clear the control of all the usesr.

Any help is appreciated.

Thanks.

6 replies

Forum|alt.badge.img+14
  • Scholar
  • May 17, 2017

see  


Forum|alt.badge.img+2

I have already checked that article. It talks about adding the users. I could not figure out, hoe to remove the users, from it.

I tried -

NWF$('#' + fldCompanyUsers).clear();

But, this does not do the required.


Forum|alt.badge.img+14
  • Scholar
  • May 18, 2017

read through it carefully what's the proper usage. and there is an example how to remove an user as well.

to clear all the users following should work

var varPP = new NF.PeoplePickerApi('#' + fldCompanyUsers);
varPP.clear();

Forum|alt.badge.img+2

That did the Job.

I was trying to mix both the statements. But puttting them seperate as given by you, has done the trick.

Thanks, I appreciate your efforts.


Forum|alt.badge.img+14
  • Scholar
  • May 18, 2017

converted discussion to question.


Forum|alt.badge.img+14
  • Scholar
  • May 18, 2017

great!

if you have a working solution please select and mark correct answer.