Check current user for SharePoint Online user group membership

ZForms for Office 365 > How to? > Check current user for SharePoint Online user group membership

Check if current user is a member of the group specified in a field:

dataAdapter.getCurrentUserGroupNames().then(groupNames => 
groupNames.indexOf((item.usergroupfield||[{}])[0].title) > -1),

where usergroupfield – Internal Name of the field.

Check if current user is a member of the specified group:

dataAdapter.getCurrentUserGroupNames().then(groupNames => 
groupNames.indexOf('GroupName') > -1),

where GroupName – name of the group.

Contents