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
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.".
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.