RolePermissionValue Collection Methods

In this section, we discuss the RolePermissionValue collection methods. The methods are discussed in alphabetical order.

Syntax

DeleteItem(RolePermissionValueName)

Description

The DeleteItem method deletes the RolePermissionValue object identified by RolePermissionValueName from the RolePermissionValue Collection.

This method is not executed automatically. It is executed only when the parent object is saved.

Parameters

Field or Control

Definition

RolePermissionValueName

Specify the name of a RolePermissionValue existing in the RolePermissionValue collection.

Returns

A Boolean value: True if the RolePermissionValue was deleted, False otherwise.

Example

If Not &MyPValColl.DeleteItem("ALLPNLS") Then 
   /* do error processing */
End-If;

Syntax

First()

Description

The First method returns the first RolePermissionValue object in the RolePermissionValue collection.

Parameters

None.

Returns

A RolePermissionValue object.

Example

&MyRolePermissionValue = &MyCollection.First();

Syntax

InsertItem(RolePermissionValueName)

Description

The InsertItem method inserts the RolePermissionValue object identified by RolePermissionValueName into the RolePermissionValue Collection.

This method is not executed automatically. It is executed only when the parent object is saved.

Note: You cannot add any RolePermissionValue objects to a collection returned by the CascadedRolePermissions property. You can only add values to the collection returned by the RolePermissions property.

Parameters

Field or Control

Definition

RolePermissionValueName

Specify the name of an existing role permission list.

Returns

A reference to the new RolePermissionValue object if the method executed successfully, NULL otherwise.

Example

&MyPermV = &MyPermVColl.InsertItem("ALLPNLS");

If Not &MyPermV Then 
   /* do error processing */
End-If;

Syntax

ItemByName(Name)

Description

The ItemByName method returns the RolePermissionValue object with the name Name.

Parameters

Field or Control

Definition

Name

Specify the name of an existing RolePermissionValue within the RolePermissionValue collection. If you specify an invalid name, the object is NULL.

Returns

A RolePermissionValue object if successful, NULL otherwise.

Example

&MyPVal = &MyPValColl.ItemByName("CUSTOMER");

Syntax

Next()

Description

The Next method returns the next RolePermissionValue object in the RolePermissionValue collection. You can use this method only after you have used the First method: otherwise the system doesn’t know where to start.

Parameters

None.

Returns

RolePermissionValue object.

Example

&MyRolePermissionValue = &MyCollection.Next();