Skip to main content
Nintex Community Menu Bar

How can you filter a people picker field based on a SharePoint group?

  • March 19, 2018
  • 8 replies
  • 270 views

Forum|alt.badge.img+3

How can you filter a people picker field based on a SharePoint group?

8 replies

Forum|alt.badge.img+14
  • Scholar
  • March 22, 2018

any further details on what you want to achieve?

it you restrict PP field/control to accept only users from a specific SP group it will do restrict possible inputs to the group members.

I'm not sure what further filter would you  mean.


Forum|alt.badge.img
  • July 20, 2018

For me, I need to put a number of groups names into a dropdown list box ( group1 => id=19, group2=>id=19, group3=> id=20.  Then when the value of the dropdown list box changes, update the value of the data-sharepointgroup on the people control so that the users being queried changes.

I basically need to assign a task to a list of people from one of the groups listed in the dropdown.

. I've toyed with use the _catalogsusers  hidden list but that isn't working out too well. I can seem to get the secret hand shake on specifying a hidden list as an expression in the list property..


Forum|alt.badge.img+14
  • Scholar
  • July 23, 2018

that's, unfortunately, not possible with nintex. people control doesn't support to change source user group at runtime.

what you could do at mosty is to add a separate people control for each group. then use formatting rules which based on dropdown selection show respective people control and hide all the others.


Forum|alt.badge.img
  • July 23, 2018

True, there is no api - but the control behaves like a client-side control and there is a field on the control  data-sharePointGroup where the name if the group is specified.. It one were already familiar with the javascript nuances for the Nintex, it seems like it would be almost trivial to stuff the value of the dropdown listbox with the group name into data-SharePoint group field in the client side control.. Maybe I'm wrong.


Forum|alt.badge.img+14
  • Scholar
  • July 23, 2018

if you want to bother with javascript, then try following

NWF$('#'+PPControl).data('sharepointgroupid',12345);
NF.PeoplePickerHelper.Initialize(NWF$('#'+PPControl));

replace '12345' with your real SP group ID

 


Forum|alt.badge.img+2
  • Nintex Partner
  • October 21, 2019

Hi, very usefull! 

However, I need to filter People Picker using a couple of gropus, e.g. 1234 and 5678.

How to do this?


Forum|alt.badge.img+9
  • Novice
  • February 21, 2020

Hi @mgragnani , were you able to filter your People picker field with multiple groups? I'm trying to apply the same. 


Forum|alt.badge.img+2
  • Nintex Partner
  • March 3, 2020

Unfotunately not... 

I have tried to script this but no chance, pls let me know if you find a solution