Form People Picker

I have a people picker field in the form,when a name is given, it has to check if that person is in a sharepoint group or not and if yes enable "cancel" button otherwise disable. I got this formula= not(fn-IsMemberOfGroup('Only for Form')) (i applied this to button),from one of the articles here, its working but its taking the current user who ever is logged in. how to take name from the people picker,can please anyone help.

Thanks in advance

0 Kudos
1 Reply

Re: Form People Picker

Hi Anjali sharma,

As it is described as such in the Help file:


Returns true if the current user belongs to the Windows / SharePoint group specified in the string argument.".

The only solution currently coming to mind is using JavaScript. Here are 2 blog posts on how to do this:

Keep in mind to use a delay when calling the method/function which determines group membership as the Nintex People picker control needs to have some time getting the selected user's info.The snippets of then use the web service calls GetUserCollectionFromGroup or GetGroupCollectionForUser

An alternative is to have a scheduled site workflow (once a day/week, depending on frequency of group update) which calls GetUserCollectionFromGroup and (re)populates a list with usernames, which you could use in your Form (e.g. utilizing the Lookup inline function). Or work the otherway around: have a list where you add/maintain users of a list and have a workflow update the SharePoint group when a user is add/removed/changed. And again use the list in your Form

Hopefully this helps.

0 Kudos