Difference between revisions of "IsMemberOfGroup"

From Catglobe Wiki
Jump to: navigation, search
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Group_Functions]]
 
[[Category:Group_Functions]]

+
[OBSOLETE - Please use [[Group_isMemberOfGroup|Group_isMemberOfGroup]]. More detail at [[ConversionMethods|ConversionMethods]]]
  
 
====isMemberOfGroup====
 
====isMemberOfGroup====
Line 21: Line 21:
  
 
bool b = isMemberOfGroup(1);
 
bool b = isMemberOfGroup(1);
 +
 +
print(b);
  
 
'''Availability'''
 
'''Availability'''
Line 28: Line 30:
 
==is member of Group (alternative 1)==
 
==is member of Group (alternative 1)==
  
Returns whether user of the current questionnaire answer sheet is member of specified group. Throws exception if no group by that id exists.
+
Returns whether user of the current questionnaire answer sheet is member of specified group. Throws exception if no group by whose qualified name exists.
  
 
'''Syntax'''
 
'''Syntax'''
Line 36: Line 38:
 
'''Arguments'''
 
'''Arguments'''
  
''groupName'': a string expression. It is the name of the group.
+
''groupName'': a string expression. It is the qualified name of the group.
  
 
'''Return type'''
 
'''Return type'''
Line 44: Line 46:
 
'''Example'''
 
'''Example'''
  
bool b = isMemberOfGroup("Qnaire_Group");
+
bool b = isMemberOfGroup("Personal folders\\Pham Ngoc Son\\Son test group");
  
 
'''Availability'''
 
'''Availability'''
Line 52: Line 54:
 
==is member of Group (alternative 2)==
 
==is member of Group (alternative 2)==
  
Returns whether a user is member of specified group. Throws exception if no group by that id exists.
+
Returns whether a user is member of specified group.
  
 
'''Syntax'''
 
'''Syntax'''
Line 78: Line 80:
 
==is member of Group (alternative 3)==
 
==is member of Group (alternative 3)==
  
Returns whether a user is member of specified group. Throws exception if no group by that id exists.
+
Returns whether a user is member of specified group.
  
 
'''Syntax'''
 
'''Syntax'''
Line 96: Line 98:
 
'''Example'''
 
'''Example'''
  
bool b = isMemberOfGroup(1, "Qnaire_Group");
+
bool b = isMemberOfGroup(1, "Personal folders\\Pham Ngoc Son\\Son test group");
  
 
'''Availability'''
 
'''Availability'''

Latest revision as of 04:25, 13 May 2022

[OBSOLETE - Please use Group_isMemberOfGroup. More detail at ConversionMethods]

isMemberOfGroup

Returns whether user of the current questionnaire answer sheet is member of specified group. Throws exception if no group by that id exists.

Syntax

isMemberOfGroup(groupId)

Arguments

groupId: a numeric expression. It is the id of the group.

Return type

bool

Example

bool b = isMemberOfGroup(1);

print(b);

Availability

Version 5.2

is member of Group (alternative 1)

Returns whether user of the current questionnaire answer sheet is member of specified group. Throws exception if no group by whose qualified name exists.

Syntax

isMemberOfGroup(groupName)

Arguments

groupName: a string expression. It is the qualified name of the group.

Return type

bool

Example

bool b = isMemberOfGroup("Personal folders\\Pham Ngoc Son\\Son test group");

Availability

Version 5.2

is member of Group (alternative 2)

Returns whether a user is member of specified group.

Syntax

isMemberOfGroup(userId, groupId)

Arguments

userId: a numeric expression. It is the user’s id.

groupId: a numeric expression. It is the group’s id.

Return type

bool

Example

bool b = isMemberOfGroup(1, 2);

Availability

Version 5.2

is member of Group (alternative 3)

Returns whether a user is member of specified group.

Syntax

isMemberOfGroup(userId, groupName)

Arguments

userId: a numeric expression. It is the user’s id.

groupName: a string expression. It is the group’s qualified name.

Return type

bool

Example

bool b = isMemberOfGroup(1, "Personal folders\\Pham Ngoc Son\\Son test group");

Availability

Version 5.2

==