RenameGroup Method (PIGroups collection)

               

 

The Rename method changes the name of an existing PIGroup on the Server and in the PIGroups collection.

 

Syntax

object.RenameGroup OldName, NewName

The RenameGroup method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIGroups collection.

OldName

A string containing the name of the existing PIGroup to be renamed as obtained from the PIGroup.Name property.

NewName

A string containing the new name for the PIGroup

 

Remarks

Server resources owned by the group continue to be owned by the group and have the same access rights after the name change. The contents (users) of the renamed group are not changed by this method.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseACCESSDENIED

Caller does not have sufficient privilege to modify a PIGroup

pseNOEMPTYSTRINGS

Both the oldName and the newName must be non-blank.

pseGROUPNOTFOUND

The passed oldName does not exist on the server.

pseGROUPRENAME

Unable to rename the group on the server. See the error description for more information.

Enabling Operational Intelligence