PermissionValue Collection Methods

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

Syntax

DeleteItem(PermissionValueName)

Description

The DeleteItem method deletes the PermissionValue object identified by PermissionValueName from the PermissionValue Collection.

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

Parameters

Field or Control

Definition

PermissionValueName

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

Returns

A Boolean value: True if the PermissionValue 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 PermissionValue object in the PermissionValue collection.

Parameters

None.

Returns

A PermissionValue object.

Example

&MyPermissionValue = &MyCollection.First();

Syntax

InsertItem(PermissionValueName)

Description

The InsertItem method inserts the PermissionValue object identified by PermissionValueName into the PermissionValue Collection.

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

Note: You cannot add any PermissionValue objects to a collection returned by the CascadedPermissions property. You can only add values to the collection returned by the Permissions property.

Parameters

Field or Control

Definition

PermissionValueName

Specify the name of an existing permission list.

Returns

A reference to the new PermissionValue 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 PermissionValue object with the name Name.

Parameters

Field or Control

Definition

Name

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

Returns

A PermissionValue object if successful, NULL otherwise.

Example

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

Syntax

Next()

Description

The Next method returns the next PermissionValue object in the PermissionValue 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

PermissionValue object.

Example

&MyPermissionValue = &MyCollection.Next();