Toggle menu
913
3.8K
30.2K
279.2K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Group class: Difference between revisions

From Catglobe Wiki
Created page with "{{CGscriptClass_Template|Name=<nowiki>Group</nowiki>|Description=<nowiki>Represents a group resource.</nowiki>|InheritsFrom=Array|Constructors={{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}} |Description=<nowiki>Get an existing group by resource id</nowiki>}} {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=string|..."
 
No edit summary
 
Line 1: Line 1:
{{CGscriptClass_Template|Name=<nowiki>Group</nowiki>|Description=<nowiki>Represents a group resource.</nowiki>|InheritsFrom=Array|Constructors={{CGscriptConstructors_Template|Parameters=
{{CGscriptClass_Template
|Name=<nowiki>Group</nowiki>
|Description=<nowiki>Represents a group resource.</nowiki>
|InheritsFrom=Array|Constructors=
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Description=<nowiki>Get an existing group by resource id</nowiki>}}
|Description=<nowiki>Get an existing group by resource id</nowiki>}}
{{CGscriptConstructors_Template|Parameters=
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>Group name</nowiki>|Description=<nowiki>Name of the new group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group Template unique id</nowiki>|Description=<nowiki>Unique id of the group template (0 for default)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Parent resource unique id</nowiki>|Description=<nowiki>Unique id of the parent resource</nowiki>}}
{{CGscriptParameters_Template|Type=string|Name=<nowiki>Group name</nowiki>|Description=<nowiki>Name of the new group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group Template unique id</nowiki>|Description=<nowiki>Unique id of the group template (0 for default)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Parent resource unique id</nowiki>|Description=<nowiki>Unique id of the parent resource</nowiki>}}
|Description=<nowiki>Create a new group</nowiki>}}|Methods={{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>AddUser</nowiki>|Parameters=
|Description=<nowiki>Create a new group</nowiki>}}
|Methods=
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>AddUser</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>userUniqueId</nowiki>|Description=<nowiki>Unique id of the user to add</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>userUniqueId</nowiki>|Description=<nowiki>Unique id of the user to add</nowiki>}}
|Description=<nowiki>Add a user to this group; returns true if the user was newly added</nowiki>}}
|Description=<nowiki>Add a user to this group; returns true if the user was newly added</nowiki>}}
Line 58: Line 64:
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>this[] { get; }</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>this[] { get; }</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to set</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to set</nowiki>}}
|Description=<nowiki>Backward-compatible indexer</nowiki>}}|Properties={{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Average</nowiki>|HasGetter=1|Description=<nowiki>Average of the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
|Description=<nowiki>Backward-compatible indexer</nowiki>}}
|Properties=
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Average</nowiki>|HasGetter=1|Description=<nowiki>Average of the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>CalculatedManHours</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Whether man-hours are calculated automatically</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>CalculatedManHours</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Whether man-hours are calculated automatically</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>City</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>City of the address</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>City</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>City of the address</nowiki>}}
Line 73: Line 81:
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceId</nowiki>|HasGetter=1|Description=<nowiki>Unique id of the group resource</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceId</nowiki>|HasGetter=1|Description=<nowiki>Unique id of the group resource</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceTemplateResourceId</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Unique id of the resource template for this group</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceTemplateResourceId</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Unique id of the resource template for this group</nowiki>}}
{{CGscriptProperties_Template|ReturnType=Array of GroupRule|Name=<nowiki>Rules</nowiki>|HasGetter=1|Description=<nowiki>The group builder rules attached to this group</nowiki>}}
{{CGscriptProperties_Template|ReturnType=Array of GroupBuilderRule|Name=<nowiki>Rules</nowiki>|HasGetter=1|Description=<nowiki>The group builder rules attached to this group</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>StreetAddress</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Street address</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>StreetAddress</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Street address</nowiki>}}
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Sum</nowiki>|HasGetter=1|Description=<nowiki>Sum of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Sum</nowiki>|HasGetter=1|Description=<nowiki>Sum of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
Line 79: Line 87:
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Website</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Website associated with the group</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Website</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Website associated with the group</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ZipCode</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Zip/postal code of the address</nowiki>}}|StaticMethods={{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>Group_areMemberOfGroups</nowiki>|Parameters=
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ZipCode</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Zip/postal code of the address</nowiki>}}
|StaticMethods=
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Group_addUser</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>User resource id</nowiki>|Description=<nowiki>Unique id of the user to add</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Add a user to the specified group; returns true if the user was newly added</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_addUsers</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>List of user resource id</nowiki>|Description=<nowiki>Array of user unique ids to add</nowiki>}}
|Obsolete=1
|Description=<nowiki>Add specific users to a group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>Group_areMemberOfGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>List of user resource id</nowiki>|Description=<nowiki>Array of user unique ids to check</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Determine whether the specified users belong to the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>Group_areMemberOfGroups</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>List of group resource id</nowiki>|Description=<nowiki>Array of group unique ids to check</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>User resource id</nowiki>|Description=<nowiki>Unique id of the user</nowiki>}}
{{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>List of group resource id</nowiki>|Description=<nowiki>Array of group unique ids to check</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>User resource id</nowiki>|Description=<nowiki>Unique id of the user</nowiki>}}
|Description=<nowiki>Determine which of the specified groups the user is a member of</nowiki>}}
|Description=<nowiki>Determine which of the specified groups the user is a member of</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_convertToStaticUsers</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Convert all dynamic users in the specified group to static users</nowiki>}}
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Group_emailAddressExistInGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>Email Address</nowiki>|Description=<nowiki>Email address to check</nowiki>}}
|Obsolete=1
|Description=<nowiki>Determine whether the specified email exists in the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_emailAddressesExistInGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>Email Address</nowiki>|Description=<nowiki>Array of email addresses to check</nowiki>}}
|Obsolete=1
|Description=<nowiki>Determine which of the specified emails exist in the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_getAllGroupResourceIdByUserResourceId</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_getAllGroupResourceIdByUserResourceId</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>User resource id</nowiki>|Description=<nowiki>Unique id of the user</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>User resource id</nowiki>|Description=<nowiki>Unique id of the user</nowiki>}}
|Description=<nowiki>Get all group resource ids for a user</nowiki>}}
|Description=<nowiki>Get all group resource ids for a user</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Group|Name=<nowiki>Group_getGroupByName</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>Group qualified name</nowiki>|Description=<nowiki>Fully qualified name of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Get the existing group array object by qualified name</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Group|Name=<nowiki>Group_getGroupByResourceId</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Get the existing group array object by unique resource id</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_getMembers</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Return an array of user resource ids in the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_getMembers</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>Include deleted</nowiki>|Description=<nowiki>Whether to include deleted users</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>Include disabled</nowiki>|Description=<nowiki>Whether to include disabled users</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>Include static</nowiki>|Description=<nowiki>Whether to include static users</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>Include dynamic</nowiki>|Description=<nowiki>Whether to include dynamic users</nowiki>}}
|Obsolete=1
|Description=<nowiki>Return an array of user resource ids in the specified group with filter options</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_getTimeUsed</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group unique id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>Include unverified hours</nowiki>|Description=<nowiki>Whether to include unverified hours</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>From date</nowiki>|Description=<nowiki>Start of the date range (inclusive)</nowiki>}}
|Obsolete=1
|Description=<nowiki>Returns an array of time-registration records for group members between two dates</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_getTimeUsed</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group unique id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>Include unverified hours</nowiki>|Description=<nowiki>Whether to include unverified hours</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>From date</nowiki>|Description=<nowiki>Start of the date range (inclusive)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>To date</nowiki>|Description=<nowiki>End of the date range (inclusive); defaults to max date if omitted</nowiki>}}
|Obsolete=1
|Description=<nowiki>Returns an array of time-registration records for group members between two dates</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_getTimeUsed</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group unique id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>Include unverified hours</nowiki>|Description=<nowiki>Whether to include unverified hours</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>From date</nowiki>|Description=<nowiki>Start of the date range (inclusive)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>To date</nowiki>|Description=<nowiki>End of the date range (inclusive)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool?|Name=<nowiki>Include deleted</nowiki>|Description=<nowiki>Whether to include deleted users</nowiki>}}
|Obsolete=1
|Description=<nowiki>Returns an array of time-registration records for group members between two dates, with deleted-user filter</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Group_getTimeUsed</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group unique id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>Include unverified hours</nowiki>|Description=<nowiki>Whether to include unverified hours</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>From date</nowiki>|Description=<nowiki>Start of the date range (inclusive)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>To date</nowiki>|Description=<nowiki>End of the date range (inclusive)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool?|Name=<nowiki>Include deleted</nowiki>|Description=<nowiki>Whether to include deleted users</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool?|Name=<nowiki>Include disabled</nowiki>|Description=<nowiki>Whether to include disabled users</nowiki>}}
|Obsolete=1
|Description=<nowiki>Returns an array of time-registration records for group members between two dates, with deleted and disabled user filters</nowiki>}}
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>Group_getUserCount</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>Group_getUserCount</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Description=<nowiki>Return the actual number of users in the specified group</nowiki>}}}}
|Description=<nowiki>Return the actual number of users in the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Group_isMemberOfGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>User resource id</nowiki>|Description=<nowiki>Unique id of the user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Determine whether the specified user belongs to the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Group_isMemberOfGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>groupId</nowiki>|Description=<nowiki>Legacy id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Returns true if the current answer sheet user is a member of the group with the given legacy id.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Group_isMemberOfGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>groupName</nowiki>|Description=<nowiki>Name of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Returns true if the current answer sheet user is a member of the named group.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Group_isMemberOfGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>userId</nowiki>|Description=<nowiki>Legacy id of the user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>groupId</nowiki>|Description=<nowiki>Legacy id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Returns true if the user with the given legacy id is a member of the group with the given legacy id.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Group_isMemberOfGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>userId</nowiki>|Description=<nowiki>Legacy id of the user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>groupName</nowiki>|Description=<nowiki>Name of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Returns true if the user with the given legacy id is a member of the named group.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Group|Name=<nowiki>Group_new</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=<nowiki>Group name</nowiki>|Description=<nowiki>Name of the new group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group Template unique id</nowiki>|Description=<nowiki>Unique id of the group template (0 for default)</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Parent resource unique id</nowiki>|Description=<nowiki>Unique id of the parent resource</nowiki>}}
|Obsolete=1
|Description=<nowiki>Create a new group and return the group array object</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_rebuildGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group to rebuild</nowiki>}}
|Obsolete=1
|Description=<nowiki>Rebuild the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_rebuildGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group to rebuild</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool?|Name=<nowiki>Parallel build</nowiki>|Description=<nowiki>Whether to rebuild rules in parallel transactions</nowiki>}}
|Obsolete=1
|Description=<nowiki>Rebuild the specified group with optional parallel execution</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_rebuildGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>groupId</nowiki>|Description=<nowiki>Group legacy id</nowiki>}}
|Obsolete=1
|Description=<nowiki>Rebuilds the group with the given legacy id.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_rebuildGroup</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>groupId</nowiki>|Description=<nowiki>Group legacy id</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>parallelBuild</nowiki>|Description=<nowiki>If true use parallel build</nowiki>}}
|Obsolete=1
|Description=<nowiki>Rebuilds the group with the given legacy id.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_removeAllUsers</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Remove all users from the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_removeUser</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>User resource id</nowiki>|Description=<nowiki>Unique id of the user to remove</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>}}
|Obsolete=1
|Description=<nowiki>Remove a user from the specified group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_removeUsers</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Group resource id</nowiki>|Description=<nowiki>Unique id of the group</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>List of user resource id</nowiki>|Description=<nowiki>Array of user unique ids to remove</nowiki>}}
|Obsolete=1
|Description=<nowiki>Remove specific users from a group</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Group_save</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=Group|Name=<nowiki>group</nowiki>|Description=<nowiki>Group array object to save</nowiki>}}
|Obsolete=1
|Description=<nowiki>Save the specified group to the database</nowiki>}}
}}

Latest revision as of 09:47, 11 May 2026

Group


Represents a group resource.

Parent class

Inherits from Array

Constructors

  • (int Group resource id "Unique id of the group") - Get an existing group by resource id
  • (string Group name "Name of the new group", int Group Template unique id "Unique id of the group template (0 for default)", int Parent resource unique id "Unique id of the parent resource") - Create a new group

Methods

  • bool AddUser(int userUniqueId "Unique id of the user to add") - Add a user to this group; returns true if the user was newly added
  • Empty AddUsers(Array of int userUniqueIds "Array of user unique ids to add") - Add specific users to this group
  • Dictionary AreMember(Array of int userUniqueIds "Array of user unique ids to check") - Determine whether the specified users belong to this group
  • Empty ConvertToStaticUsers() - Convert all dynamic users in this group to static users
  • bool EmailAddressExists(string emailAddress "Email address to check") - Determine whether the specified email exists in this group
  • array EmailAddressesExist(array emailAddresses "Array of email addresses to check") - Determine which of the specified emails exist in this group
  • array GetMembers() - Return an array of user resource ids in this group
  • array GetMembers(bool includeDeleted "Whether to include deleted users", bool includeDisabled "Whether to include disabled users", bool includeStatic "Whether to include static users", bool includeDynamic "Whether to include dynamic users") - Return an array of user resource ids in this group with filter options
  • array GetTimeUsed(bool includeUnverifiedHour "Whether to include unverified hours", DateTime fromDate "Start of the date range (inclusive)") - Returns time-registration records for group members from a date onwards
  • array GetTimeUsed(bool includeUnverifiedHour "Whether to include unverified hours", DateTime fromDate "Start of the date range (inclusive)", DateTime toDate "End of the date range (inclusive)") - Returns time-registration records for group members between two dates
  • array GetTimeUsed(bool includeUnverifiedHour "Whether to include unverified hours", DateTime fromDate "Start of the date range (inclusive)", DateTime toDate "End of the date range (inclusive)", bool includeDeleted "Whether to include deleted users") - Returns time-registration records for group members between two dates, with deleted-user filter
  • array GetTimeUsed(bool includeUnverifiedHour "Whether to include unverified hours", DateTime fromDate "Start of the date range (inclusive)", DateTime toDate "End of the date range (inclusive)", bool includeDeleted "Whether to include deleted users", bool includeDisabled "Whether to include disabled users") - Returns time-registration records for group members between two dates, with deleted and disabled user filters
  • int GetUserCount() - Return the actual number of users in this group
  • bool IsMember(int userUniqueId "Unique id of the user") - Determine whether the specified user belongs to this group
  • Empty RebuildGroup() - Rebuild this group's member list
  • Empty RebuildGroup(bool parallelBuild "Whether to rebuild rules in parallel transactions") - Rebuild this group's member list
  • Empty RemoveAllUsers() - Remove all users from this group
  • Empty RemoveUser(int userUniqueId "Unique id of the user to remove") - Remove a user from this group
  • Empty RemoveUsers(Array of int userUniqueIds "Array of user unique ids to remove") - Remove specific users from this group
  • Empty Save() - Save the group to the database
  • string ToString() - The string representation of the object.
  • object this[] { get; }(int index "Index") - Backward-compatible indexer
  • Empty this[] { get; }(int index "Index", object value "Value to set") - Backward-compatible indexer

Properties

  • number Average { get; } - Average of the objects in the Array object. Can only use if all the elements are of type Number
  • bool CalculatedManHours { get; set; } - Whether man-hours are calculated automatically
  • string City { get; set; } - City of the address
  • string CountryIsoCode { get; set; } - ISO code of the address country
  • int ManHours { get; set; } - Allocated man-hours for this group
  • number Max { get; } - Largest of all the objects in the Array object. Can only use if all the elements are of type Number
  • number Min { get; } - Smallest of all the objects in the Array object. Can only use if all the elements are of type Number
  • string Name { get; set; } - Display name of the group
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ParentResourceId { get; set; } - Unique id of the parent resource
  • array PhoneNumbers { get; set; } - Phone numbers associated with this group
  • string Postbox { get; set; } - Postbox of the address
  • string Region { get; set; } - Region of the address
  • int ResourceId { get; } - Unique id of the group resource
  • int ResourceTemplateResourceId { get; set; } - Unique id of the resource template for this group
  • Array of GroupBuilderRule Rules { get; } - The group builder rules attached to this group
  • string StreetAddress { get; set; } - Street address
  • number Sum { get; } - Sum of all the objects in the Array object. Can only use if all the elements are of type Number
  • bool TimeRegEnabled { get; set; } - Whether time registration is enabled for this group
  • TypeInformation TypeInformation { get; } - Get information about this class.
  • string Website { get; set; } - Website associated with the group
  • string ZipCode { get; set; } - Zip/postal code of the address

Static Methods

  • bool Group_addUser(int User resource id "Unique id of the user to add", int Group resource id "Unique id of the group") - Add a user to the specified group; returns true if the user was newly added
  • Empty Group_addUsers(int Group resource id "Unique id of the group", Array of int List of user resource id "Array of user unique ids to add") - Add specific users to a group
  • Dictionary Group_areMemberOfGroup(Array of int List of user resource id "Array of user unique ids to check", int Group resource id "Unique id of the group") - Determine whether the specified users belong to the specified group
  • Dictionary Group_areMemberOfGroups(Array of int List of group resource id "Array of group unique ids to check", int User resource id "Unique id of the user") - Determine which of the specified groups the user is a member of
  • Empty Group_convertToStaticUsers(int Group resource id "Unique id of the group") - Convert all dynamic users in the specified group to static users
  • bool Group_emailAddressExistInGroup(int Group resource id "Unique id of the group", string Email Address "Email address to check") - Determine whether the specified email exists in the specified group
  • array Group_emailAddressesExistInGroup(int Group resource id "Unique id of the group", array Email Address "Array of email addresses to check") - Determine which of the specified emails exist in the specified group
  • array Group_getAllGroupResourceIdByUserResourceId(int User resource id "Unique id of the user") - Get all group resource ids for a user
  • Group Group_getGroupByName(string Group qualified name "Fully qualified name of the group") - Get the existing group array object by qualified name
  • Group Group_getGroupByResourceId(int Group resource id "Unique id of the group") - Get the existing group array object by unique resource id
  • array Group_getMembers(int Group resource id "Unique id of the group") - Return an array of user resource ids in the specified group
  • array Group_getMembers(int Group resource id "Unique id of the group", bool Include deleted "Whether to include deleted users", bool Include disabled "Whether to include disabled users", bool Include static "Whether to include static users", bool Include dynamic "Whether to include dynamic users") - Return an array of user resource ids in the specified group with filter options
  • array Group_getTimeUsed(int Group unique id "Unique id of the group", bool Include unverified hours "Whether to include unverified hours", DateTime From date "Start of the date range (inclusive)") - Returns an array of time-registration records for group members between two dates
  • array Group_getTimeUsed(int Group unique id "Unique id of the group", bool Include unverified hours "Whether to include unverified hours", DateTime From date "Start of the date range (inclusive)", DateTime To date "End of the date range (inclusive); defaults to max date if omitted") - Returns an array of time-registration records for group members between two dates
  • array Group_getTimeUsed(int Group unique id "Unique id of the group", bool Include unverified hours "Whether to include unverified hours", DateTime From date "Start of the date range (inclusive)", DateTime To date "End of the date range (inclusive)", bool? Include deleted "Whether to include deleted users") - Returns an array of time-registration records for group members between two dates, with deleted-user filter
  • array Group_getTimeUsed(int Group unique id "Unique id of the group", bool Include unverified hours "Whether to include unverified hours", DateTime From date "Start of the date range (inclusive)", DateTime To date "End of the date range (inclusive)", bool? Include deleted "Whether to include deleted users", bool? Include disabled "Whether to include disabled users") - Returns an array of time-registration records for group members between two dates, with deleted and disabled user filters
  • int Group_getUserCount(int Group resource id "Unique id of the group") - Return the actual number of users in the specified group
  • bool Group_isMemberOfGroup(int User resource id "Unique id of the user", int Group resource id "Unique id of the group") - Determine whether the specified user belongs to the specified group
  • bool Group_isMemberOfGroup(int groupId "Legacy id of the group") - Returns true if the current answer sheet user is a member of the group with the given legacy id.
  • bool Group_isMemberOfGroup(string groupName "Name of the group") - Returns true if the current answer sheet user is a member of the named group.
  • bool Group_isMemberOfGroup(int userId "Legacy id of the user", int groupId "Legacy id of the group") - Returns true if the user with the given legacy id is a member of the group with the given legacy id.
  • bool Group_isMemberOfGroup(int userId "Legacy id of the user", string groupName "Name of the group") - Returns true if the user with the given legacy id is a member of the named group.
  • Group Group_new(string Group name "Name of the new group", int Group Template unique id "Unique id of the group template (0 for default)", int Parent resource unique id "Unique id of the parent resource") - Create a new group and return the group array object
  • Empty Group_rebuildGroup(int Group resource id "Unique id of the group to rebuild") - Rebuild the specified group
  • Empty Group_rebuildGroup(int Group resource id "Unique id of the group to rebuild", bool? Parallel build "Whether to rebuild rules in parallel transactions") - Rebuild the specified group with optional parallel execution
  • Empty Group_rebuildGroup(int groupId "Group legacy id") - Rebuilds the group with the given legacy id.
  • Empty Group_rebuildGroup(int groupId "Group legacy id", bool parallelBuild "If true use parallel build") - Rebuilds the group with the given legacy id.
  • Empty Group_removeAllUsers(int Group resource id "Unique id of the group") - Remove all users from the specified group
  • Empty Group_removeUser(int User resource id "Unique id of the user to remove", int Group resource id "Unique id of the group") - Remove a user from the specified group
  • Empty Group_removeUsers(int Group resource id "Unique id of the group", Array of int List of user resource id "Array of user unique ids to remove") - Remove specific users from a group
  • Empty Group_save(Group group "Group array object to save") - Save the specified group to the database