Forms Designer Groups

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Post Reply
UDRO
Posts: 21
Joined: Mon Sep 21, 2020

06 Oct 2021

Hello,

I want to check, if user is in a sharepoint-group.

In the form there are two fields:

a) group-name as string (grouptxt)

and

b) group-name as user and group-field (groupusr)


I tried this:
  • IsCurrentUserMemberOfGroup([grouptxt])

    IsCurrentUserMemberOfGroup([groupusr])

    IsCurrentUserMemberOfGroup(‘grouptxt’)

    IsCurrentUserMemberOfGroup(‘groupusr’)
Unfortunatly nothing worked.

Can you tell me the correct syntax?

Thank you again.

User avatar
Nikita Kurguzov
Posts: 882
Joined: Mon Jul 03, 2017

06 Oct 2021

Dear URDO,
Where are you trying to check this? Are you trying to check it in JavaScript editor or in Group Editor > User-defined rules? - https://spform.com/documentation/groups
Cheers

UDRO
Posts: 21
Joined: Mon Sep 21, 2020

06 Oct 2021

Group Editor

User avatar
Nikita Kurguzov
Posts: 882
Joined: Mon Jul 03, 2017

06 Oct 2021

Dear UDRO,
There is an example in the documentation, here:

Code: Select all

IsCurrentUserMemberOfGroup(‘Members’)
As you can see, it just uses group name as a string 'Members'

Please, note, that only SharePoint groups can be checked this way, these ones:
SPGroups.png
SPGroups.png (37.83 KiB) Viewed 3337 times
Cheers

UDRO
Posts: 21
Joined: Mon Sep 21, 2020

06 Oct 2021

Dear Nikita,

this works fine if I write one group-name into the condition between the quotes as a constant.

But I have to get the group-name from fd.field, where they are in. In the rule they are varialble.

There are 40 different groups, which can appear in fd.field. They differ from record to record.

So it would be great, if the rule could take the value from the fd.field.


I hope you can understand my bad explanations.

Thank you for everything.

User avatar
Nikita Kurguzov
Posts: 882
Joined: Mon Jul 03, 2017

06 Oct 2021

Dear URDO,
Not sure this will work, but you can try:

Code: Select all

ContainsCurrentUser([FieldName])
Cheers

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests