version 6.0
Set group properties (groupID; name; owner{; members}) Number
Parameter | Type | Description | |
groupID | Number | Unique ID number of group, or | |
-1 for adding a Designer group, or | |||
-2 for adding an Administrator group | |||
name | String | New group name | |
owner | Number | User ID number of new group owner | |
members | Numeric Array | New group members | |
Function result | Number | Unique ID number of new group |
Description
Set group properties enables you to change and update the properties of an existing group whose unique group ID number you pass in groupID, or to add a new group affiliated with the Designer or the Administrator.
If you are changing the properties of an existing group, you must pass a valid group ID number returned by the command GET GROUP LIST. Group ID numbers can have the following values or ranges:
Group ID number | Group description |
15001 to 32767 | Group created by the Designer or affiliated Group Owner |
(group #15001 is the first group created by the Designer, | |
group #15002 the second, and so on). | |
-15001 to -32768 | Group created by the Administrator or affiliated Group Owner |
(group #-15001 is the first group created by the Administrator, | |
group #-15002 the second, and so on). |
To add a new group affiliated with the Designer, pass -1 in groupID. To add a new group affiliated with the Administrator, pass -2 in groupID. After the call, if the group is successfully added, its unique ID number is returned in groupID.
If you do not pass -1, -2 or a valid group ID number, Set group properties does nothing.
Before the call, you pass the new name and owner of the group in the parameters name and owner. If you do not want to change all the properties of the group (besides the members, see below), first call GET GROUP PROPERTIES and pass the returned values for the properties you want to leave unchanged.
If you do not pass the optional members parameter, the current member list of the group is left unchanged. If you do not pass members while adding a group, the group will have no members.
Note: The group owner is not automatically set as a member of the group that he or she owns. It is up to you to include the group owner in the group, using the members parameter.
If you pass the optional members parameter, you change the whole member list for the group. Before the call, you must populate the array members with the unique ID numbers of the users and groups the group will get as members. Member ID numbers can have the following ranges:
Member ID number | Member Description |
1 | Designer user |
2 | Administrator user |
3 to 15000 | User created by the Designer of the database |
(user #3 is the first user created by the Designer, | |
user #4 the second, and so on). | |
-11 to -15000 | User created by the Administrator of the database |
(user #-11 is the first user created by the Designer, | |
user #-12 is the second, and so on). | |
15001 to 32767 | Group created by the Designer or affiliated Group Owner |
(group #15001 is the first group created by the Designer, | |
group #15002 the second, and so on). | |
-15001 to -32768 | Group created by the Administrator or affiliated Group Owner |
(group #-15001 is the first group created by the Administrator, | |
group #-15002 the second, and so on). |
To remove all the members from a group, pass an empty members array.
See Also
GET GROUP LIST, GET GROUP PROPERTIES, GET USER LIST.
Error Handling
If you do not have the proper access privileges for calling Set group properties or if the Password system is already accessed by another process, an access privilege error is generated. You can catch this error with an error-handling method installed using ON ERR CALL.