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

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

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

0 Kudos
Reply
5 Replies
Workflow Hero

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

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.

0 Kudos
Accept as Solution Reply
Workflow Hero

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

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 _catalogs\users  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..

0 Kudos
Accept as Solution Reply
Workflow Hero

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

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.

0 Kudos
Accept as Solution Reply
Workflow Hero

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

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.

0 Kudos
Accept as Solution Reply
Workflow Hero

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

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

 

0 Kudos
Accept as Solution Reply