Group class
From Catglobe Wiki
More actions
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 GroupRule 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
- 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
- array Group_getAllGroupResourceIdByUserResourceId(int User resource id "Unique id of the user") - Get all group resource ids for a user
- int Group_getUserCount(int Group resource id "Unique id of the group") - Return the actual number of users in the specified group