Forms Designer Groups
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:
Can you tell me the correct syntax?
Thank you again.
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’)
Can you tell me the correct syntax?
Thank you again.
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
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
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
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear UDRO,
There is an example in the documentation, here:
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:
There is an example in the documentation, here:
Code: Select all
IsCurrentUserMemberOfGroup(‘Members’)
Please, note, that only SharePoint groups can be checked this way, these ones:
Cheers
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.
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.
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear URDO,
Not sure this will work, but you can try:
Not sure this will work, but you can try:
Code: Select all
ContainsCurrentUser([FieldName])
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 20 guests